1. SSH key

command:

ssh-keygen

cat id_rsa.pub

 

 

 2. git status

git commit -m description

git push

git pull

git merge

 

 

 

 

 

 

 

 

 

 

 

 

 

 3. commit change to a new branch

git checkout -b branchname    ----- 创建一个branch

 

 

 4. pull remote branch (not master) code to local。

git init

git remote add origin sshpath

git pull origin branchname

 

5. 切换branch

git checkout branchname

当切换不成功时强制切换。

git checkout -t branchname

 

 

6. merge 两个分支代码 (比如, merge develop 分支代码到haining branch)

git checkout branchname1

git pull origin branchname1

git checkout branchname2

git merge branchname1

有conflic 要解决conflic

 

7. 删除remote branch

git push origin --delete branchname

 

posted on 2021-08-04 14:05  小海海宁宁  阅读(24)  评论(0编辑  收藏  举报