git的相关命令
2016-07-08 17:26
295 查看
git branch //可以查看当前的branch有多少个,当前用的branch是哪个(带*号的是当前用的branch)
git branch //创建新的branch
git checkout //切换到名字为branchname的branch
git push origin //把修改的文件push到origin这个仓库的名为branchname的branch,而其他branch 不受影响
git add //添加你要提交或修改的文件
git commit -m “info of the file” //提交文件
git commit -a
git push origin //提交已经commit的文件到github
git merge //合并你想合并的分支(注意:如果你想合并分支到master,需要先将本地分支切换到master,然后branchname为你刚刚修改过的分支名称)
git push origin //将本地分支提交到github
git log //查看提交的日志信息(在英语状态下按q可以退出)
git log –oneline –graph –decorate //可以图形化查看日志信息(同样,在英语状态下点击q可以退出)
https://github.com/guodongxiaren/LinuxTool/blob/master/git.md //学习各种指令
http://blog.csdn.net/huguohuan/article/details/7380349 //关于忽略已经跟踪的文件
git branch //创建新的branch
git checkout //切换到名字为branchname的branch
git push origin //把修改的文件push到origin这个仓库的名为branchname的branch,而其他branch 不受影响
git add //添加你要提交或修改的文件
git commit -m “info of the file” //提交文件
git commit -a
git push origin //提交已经commit的文件到github
git merge //合并你想合并的分支(注意:如果你想合并分支到master,需要先将本地分支切换到master,然后branchname为你刚刚修改过的分支名称)
git push origin //将本地分支提交到github
git log //查看提交的日志信息(在英语状态下按q可以退出)
git log –oneline –graph –decorate //可以图形化查看日志信息(同样,在英语状态下点击q可以退出)
https://github.com/guodongxiaren/LinuxTool/blob/master/git.md //学习各种指令
http://blog.csdn.net/huguohuan/article/details/7380349 //关于忽略已经跟踪的文件
相关文章推荐
- python下载文件的三种方法
- redis通用配置
- Android实战技巧:如何在ScrollView中嵌套ListView
- SDKD 2016 Summer Single Contest #02.D
- spring-data-redis操作redis集群
- poj 2182 lost cows
- webx之XSS攻击
- Java泛型
- AVL树
- 别人的复制文本记录一下
- LeetCode 144. Binary Tree Preorder Traversal
- UISegmentedControl的基本用法
- 倒计时 jquery.countdown插件
- Hibernate调用SQLserver存储过程
- 【ITOO 1】将List数据导出Excel表
- 【ITOO 1】将List数据导出Excel表
- 实现WEB压缩的三种途径:Web服务器(Nginx/Apache)、Php扩展、Php代码
- 【SpringMVC学习05】SpringMVC中的参数绑定总结
- 浅谈Java设计模式(九)外观模式(Facade)
- NodeJs回调操作Promise化