git常用命令详解
来源:互联网 发布:淘宝宾卡达手表怎么样 编辑:程序博客网 时间:2024/06/02 12:12
- 克隆代码库
- git clone
- 初始化代码库
- git init
- 查看分支状态
- git branch
- 比较代码不同
- git diff
- 向代码库添加代码
- git add
- 向代码库提交代码
- git commit
把本地代码推到远程主机上
- git push
git push 默认将当前分支推送到remote的同名分支上,如果只输入 git push origin 则会提示warning:
warning: push.default is unset; its implicit value is changing in
Git 2.0 from ‘matching’ to ‘simple’. To squelch this message
and maintain the current behavior after the default changes, use:git config –global push.default matching
To squelch this message and adopt the new behavior now, use:
git config –global push.default simple
When push.default is set to ‘matching’, git will push local branches
to the remote branches that already exist with the same name.In Git 2.0, Git will default to the more conservative ‘simple’
behavior, which only pushes the current branch to the corresponding
remote branch that ‘git pull’ uses to update the current branch.See ‘git help config’ and search for ‘push.default’ for further information.
(the ‘simple’ mode was introduced in Git 1.7.11. Use the similar mode
‘current’ instead of ‘simple’ if you sometimes use older versions of Git)所以在使用git push 的时候,要么使用origin 并指明分支,要么不使用origin
更新远程主机代码到本地
- git pull
- 合并代码
- git merge
- git rebase
- git cherry-pick
- 查看日志
- git log
- Git 常用命令详解
- Git常用命令详解
- Git 常用命令详解(2)
- Git 常用命令详解
- Git 常用命令详解
- Git 常用命令详解
- Git 常用命令详解
- Git 常用命令详解<转>
- Git 常用命令详解
- git常用命令详解
- Git 常用命令详解
- Git 常用命令详解
- git常用命令详解
- Git 常用命令详解
- Git 常用命令详解
- Git 常用命令详解
- git常用命令详解
- Git 常用命令详解
- js快速排序
- exchenge 反复提示重启
- Linux内核源码(asm/atomic.h)学习
- unicode与ansi字符详解
- 利用命令行通过libx264编码YUV序列
- git常用命令详解
- C语言编译和链接和加载
- 编码格式错误 warning C4819
- 好玩】续航时间提升四倍? 颂拓拓野3 Peak评测
- 使用 OpenCV 做一个简单方便的抠图工具
- FIFA 16 on Wii U this year. whereas the sport arrives
- Unity MVC:如何提升游戏开发质量
- ArcGIS教程:“采样”的工作原理
- 说说JSON和JSONP