查看分支:
git branch
創(chuàng)建并切換分支:-b參數(shù)表示創(chuàng)建并切換
git checkout -b develop-1.0.0
git stash :保存當(dāng)前工作區(qū)和暫存區(qū)的修改。
git stash pop:暫存區(qū)到工作區(qū)
第一步是用git add把文件添加進(jìn)去,實(shí)際上就是把文件修改添加到暫存區(qū);
第二步是用git commit提交更改,實(shí)際上就是把暫存區(qū)的所有內(nèi)容提交到當(dāng)前分支。
git branch命令查看當(dāng)前分支
git checkout -b develop-1.0.0
.建立本地到上游(遠(yuǎn)端)倉的鏈接 --這樣代碼才能提交上去
git branch --set-upstream-to=origin/master
git commit操作的是本地庫,git push操作的是遠(yuǎn)程庫。
git commit是將本地修改過的文件提交到本地庫中。
git push origin develop-1.0.0是將本地庫中的最新信息發(fā)送給遠(yuǎn)程庫。
git checkout feature-1.0.0/cyk
git checkout feature-1.0.0/wtk
1.客戶管理里雇員相關(guān)接口修改
2.建立qt-party-role工程
重置后推送
git push -u origin develop-1.2.9 -f
git push -u origin feature-1.0.0/cyk -f
git push -u origin feature-1.2.9 -f
git push -u origin develop-2.2.0:develop-2.2.0
git push -u origin feature-2.2.0:feature-2.2.0
git push --set-upstream origin feature-2.3.0/cyk
git push -u origin develop-2.2.2
git branch --unset-upstream
git push --set-upstream origin develop-2.1.4
git branch --unset-upstream
git push --set-upstream origin feature-2.1.4/wtk
git branch --unset-upstream
git push --set-upstream origin feature-2.1.4/cyk
git branch --set-upstream-to=origin/remote_branch your_branch
其中,origin/remote_branch是你本地分支對(duì)應(yīng)的遠(yuǎn)程分支;your_branch是你當(dāng)前的本地分支
一、開發(fā)分支(dev)上的代碼達(dá)到上線的標(biāo)準(zhǔn)后,要合并到 master 分支
git checkout dev
git pull
git checkout master
git merge dev
git push -u origin master
二、當(dāng)master代碼改動(dòng)了,需要更新開發(fā)分支(dev)上的代碼
git checkout master
git pull
git checkout dev
git merge master
git push -u origin dev
ssh-keygen -t rsa -C "xxx@ziytek.com"