git学习记录

来源:互联网 发布:arctime 字幕制作软件 编辑:程序博客网 时间:2024/06/06 01:19

1.git log 退出

当有很多条记录时,在git bash中怎么退出来,在英文状态下按q可以返回到git bash中

参考:
http://blog.csdn.net/procedure_1988/article/details/52179561

2.gitignore忽略某些文件配置学习
https://github.com/github/gitignore

3.source tree
http://www.jianshu.com/p/be9f0484af9d
http://www.cnblogs.com/wi100sh/p/5499475.html
http://www.2cto.com/kf/201605/510423.html

4.git本地分支重命名

git branch -m oldbranchname newbranchname

(参考:http://blog.csdn.net/yy20071313/article/details/49930493)

5.将某分支合并到当前分支:

git merge branchname

6.查看当前分支:

git branch

7.将当前分支推送到远程分支:

git push origin remotebranch

8.新建分支并切换到该新分支:

git checkout -b newbranchname

git官方学习文档:
https://git-scm.com/book/zh/v2/Git-%E5%88%86%E6%94%AF-%E5%88%86%E6%94%AF%E7%9A%84%E6%96%B0%E5%BB%BA%E4%B8%8E%E5%90%88%E5%B9%B6