git:新分支的内容合并到主分支

663 阅读1分钟

git add . //加到暂存区

 git commit -m '备注'  //提交并备注提交信息

git push //提交到远程仓库

git pull

git checkout swiper //更换到swiper分支

...写好代码后

git add .
git commit -m ''
git push 

push代码到swiper分支

git checkout master   //更改到主分支

git merge origin/swiper    //合并

git push    

主分支就有了swiper分支的代码