公司里的git,提交分支

公司里的git

从一家小公司跳到了大公司,技术没变,但是开发工具可谓是鸟枪换大炮,首要的问题是从svn 换到了 git,git大家肯定都玩过,但是git多人协同操作,估计只有在公司才有机会玩了。

这里我以自己的例子为例https://github.com/951565664/… 前面步骤不多说了,如果不会,这篇文章不适合你。

建立一个分支 branch1

git clone https://github.com/951565664/testbranch.git

主分支下有一个 master1.txt 文件,内容

1.master

然后我修改文件为

- 1.master
+ 1.branch
$ git branch -a
 *master
  remotes/origin/branch1
  remotes/origin/master

$ git checkout branch2
Switched to a new branch 'branch2'
Branch 'branch2' set up to track remote branch 'branch2' from 'origin'.
git add .
git commit -m 'a'
git push origin branch:branch
    原文作者:小哈
    原文地址: https://segmentfault.com/a/1190000014025141
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞