Git

2017-02-23  本文已影响0人  王康_Wang

本文参考廖雪峰的官方网站之《Git教程》,请勿用于商业用途!


工作区和暂存区
$ git clone git@github.com:xxxx/xxx.git
<<<<<<< HEAD
Creating a new branch is quick & simple.
=======
Creating a new branch is quick AND simple.
>>>>>>> branch1

修改如下后保存并提交:

Creating a new branch is quick and simple.

现在,master分支和featurel分支变成了下图所示:

冲突合并
$ git merge --no-ff -m "merge with no-ff" dev
Merge made by the 'recursive' strategy.
  readme.txt |    1 +
  1 file changed, 1 insertion(+)

因为本次合并要创建一个新的commit,所以加上-m参数,把commit描述写进去。

$ git config --global alias. st status
$ git config --global alias. co checkout
$ git config --global alias. ci commit
$ git config --global alias. br branch
$ git config --global alias. unstage 'rest HEAD'
上一篇 下一篇

猜你喜欢

热点阅读