git分支的使用

  1. 在码云打开项目点击分支,新建分支
  2. 在本地把分支拿过来,在终端运行,git pull
  3. 切换到分支上进行开发,git checkout  index-icons   (index-icons是你新建的分支名)
  4. 代码打完后再上传
  5. git add .
  6. git commit -m 'change'  (change是描述,随便)
  7. git push        (本地分支提交到网上分支)
  8. git checkout master   (合并提交到master,先切到master分支)
  9. git merge origin/index-icons  (把线上的inde-icons合并到本地master的内容)
  10. git push  (再把本地的内容提交到线上)

 

参考网站:https://www.imooc.com/learn/1278

posted @ 2020-10-16 06:42  漫漫长路</>  阅读(139)  评论(0)    收藏  举报