摘要:歡迎進(jìn)入全棧之路之版本控制基礎(chǔ)課程博客地址本系列文章將主要針對(duì)代碼的版本控制進(jìn)行講解,希望對(duì)廣大同行帶來(lái)一些幫助。下面將重點(diǎn)介紹實(shí)際項(xiàng)目中如何提交代碼至遠(yuǎn)程倉(cāng)庫(kù)。
歡迎進(jìn)入全棧之路之版本控制基礎(chǔ)課程
博客地址:https://blog.csdn.net/houjiyu...
本系列文章將主要針對(duì)代碼的版本控制進(jìn)行講解,希望對(duì)廣大同行帶來(lái)一些幫助。若有問(wèn)題請(qǐng)及時(shí)留言或加QQ:243042162。
寄語(yǔ):背景
如果你不去希望,你就不會(huì)發(fā)現(xiàn)什么東西超出了你的希望。
項(xiàng)目建立初期都是先搭建基礎(chǔ)框架,再把代碼放到代碼管理服務(wù)器上,讓項(xiàng)目組成員進(jìn)行檢出從而進(jìn)行需求的開(kāi)發(fā)。下面將重點(diǎn)介紹實(shí)際項(xiàng)目中如何提交代碼至git遠(yuǎn)程倉(cāng)庫(kù)。
步驟
1.下載安裝git
自己本身系統(tǒng)是win10,下載地址:https://git-for-windows.githu...
2.初始化版本庫(kù):git init
rain@DESKTOP-R3H1KFK MINGW64 /c/WebstormProjects/cmpy-project/project-center $ git init Initialized empty Git repository in C:/WebstormProjects/cmpy-project/p roject-center/.git/
3.添加文件到版本庫(kù):git add .
rain@DESKTOP-R3H1KFK MINGW64 /c/WebstormProjects/cmpy-project/project- center (master) $ git add . warning: LF will be replaced by CRLF in assets/css/font-awesome.min.css. The file will have its original line endings in your working directory. warning: LF will be replaced by CRLF in assets/js/ie/html5shiv.js. The file will have its original line endings in your working directory. warning: LF will be replaced by CRLF in assets/js/ie/respond.min.js. The file will have its original line endings in your working directory. warning: LF will be replaced by CRLF in assets/js/jquery.min.js. The file will have its original line endings in your working directory. warning: LF will be replaced by CRLF in assets/js/skel.min.js. The file will have its original line endings in your working directory.
4.提交到版本庫(kù),并填寫(xiě)提交備注:git commit -m "v1.0"
rain@DESKTOP-R3H1KFK MINGW64 /c/WebstormProjects/cmpy-project/project-center (master) $ git commit -m "v1.0" [master (root-commit) 260e147] v1.0 53 files changed, 8306 insertions(+)
5.把本地庫(kù)與遠(yuǎn)程庫(kù)關(guān)聯(lián):git remote add origin 你的遠(yuǎn)程庫(kù)地址
rain@DESKTOP-R3H1KFK MINGW64 /c/WebstormProjects/cmpy-project/project-center (master) $ git remote add origin 遠(yuǎn)程庫(kù)地址
6.推送至遠(yuǎn)程:git push -u origin master -f
rain@DESKTOP-R3H1KFK MINGW64 /c/WebstormProjects/cmpy-project/project-center (master) $ git push -u origin master -f Counting objects: 65, done. Delta compression using up to 4 threads. Compressing objects: 100% (65/65), done. Writing objects: 100% (65/65), 478.97 KiB | 0 bytes/s, done. Total 65 (delta 2), reused 0 (delta 0)
7.查看狀態(tài):git status
rain@DESKTOP-R3H1KFK MINGW64 /c/WebstormProjects/cmpy-project/project-center (master) $ git status On branch master Your branch is up-to-date with "origin/master". nothing to commit, working tree clean
文章版權(quán)歸作者所有,未經(jīng)允許請(qǐng)勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。
轉(zhuǎn)載請(qǐng)注明本文地址:http://systransis.cn/yun/75249.html
摘要:簡(jiǎn)介是目前世界上最先進(jìn)的分布式版本控制系統(tǒng)沒(méi)有之一。查看所有分支的版本操作記錄。工作區(qū)直接刪除文件,提交到版本庫(kù)。與他人協(xié)作涉及管理遠(yuǎn)程倉(cāng)庫(kù)以及根據(jù)需要推送或拉取數(shù)據(jù)??寺∵h(yuǎn)程倉(cāng)庫(kù)支持多種協(xié)議,默認(rèn)使用,也可以使用等其他協(xié)議。 Git簡(jiǎn)介 Git是目前世界上最先進(jìn)的分布式版本控制系統(tǒng)(沒(méi)有之一)。Linux之父Linux用C語(yǔ)言寫(xiě)了Git分布式版本控制系統(tǒng)。 分布式版本控制系統(tǒng)與集中式...
摘要:個(gè)人整理的一些常用的概念和命令集合,方便速查和快速解決某些場(chǎng)景下的問(wèn)題,覆蓋了日常開(kāi)發(fā)和協(xié)同工作下的一部分場(chǎng)景,不只是命令行的介紹。常用命令創(chuàng)建一個(gè)空白的倉(cāng)庫(kù)指的是本地的倉(cāng)庫(kù)關(guān)聯(lián)的遠(yuǎn)程倉(cāng)庫(kù)。 個(gè)人整理的一些常用的 Git 概念和命令集合,方便速查和快速解決某些場(chǎng)景下的問(wèn)題,覆蓋了日常開(kāi)發(fā)和協(xié)同工作下的一部分場(chǎng)景,不只是命令行的介紹。歡迎關(guān)注語(yǔ)雀原文,持續(xù)更新! 精簡(jiǎn)入門(mén) 1、克隆倉(cāng)庫(kù)...
閱讀 2512·2021-10-14 09:42
閱讀 1148·2021-09-22 15:09
閱讀 3556·2021-09-09 09:33
閱讀 3037·2021-09-07 09:59
閱讀 3652·2021-09-03 10:34
閱讀 3554·2021-07-26 22:01
閱讀 2836·2019-08-30 13:06
閱讀 1217·2019-08-30 10:48