Git常用命令
2015-10-23 06:40
465 查看
git branch <new-branch> 创建新branch
git checkout <branch> 切换branch
git checkout -b <new-branch> 创建并切换到新branch
Commit to local repo andpush to branch
git commit -m"commit comment"
git push origin<branch>
Diff
git difftool
配置difftool使用Beyond Compare
git config --global diff.tool bc4
git config --global difftool.bc4.cmd '\"c:/program files (x86)/beyond compare 4/bcomp.exe\" \"$LOCAL\" \"$REMOTE\"'
git config --global merge.tool bc4
git config --global mergetool.bc4.cmd '\"c:/program files (x86)/beyond compare 4/bcomp.exe\" \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\"'
git config --global mergetool.bc4.trustExitCode true
Sub module
git submodule init
git submodule update // sync the submodule to local
https://chrisjean.com/git-submodules-adding-using-removing-and-updating/
(how to upgrade submodule references)
git submodule update --init --recursive // sync the submodule to local recursively
git submodule foreach --recursive git fetch
git submodule foreach git merge origin master
相关文章推荐
- 黑马程序员-@property的使用以及注意事项
- 怎样理解封装,继承,多态!三者的区别?
- Qt Creator 窗体控件自适应窗口大小布局(转)
- 如何在Qt 4程序中优化布局结构-兼回答网友提问(转帖)
- (七)黑马程序员——oc基础之继承与重写构造方法
- 一个python写的批量修改proto包名的命令行工具
- Implement strStr()
- 夺命雷公狗jquery---10小实例-表格插入内容
- opencv2.4.11安装--配置
- 面向对象和面向过程
- 【CDAP】 新专题Cask CDAP开启
- 视图代理(转帖)
- qt中的多线程(转)
- QT GUI总结
- [汇编语言]《汇编语言 第3版》P121 实验4(3)自己的写法
- c常用字符串函数
- 黑马程序员-description的重写
- LeetCode #23 Merge k Sorted Lists (H)
- Qt探秘——谈ui文件的用法
- 黑马程序员-NSArray的使用