Git 简单操作(拉取,推送 ,合并分支,切换分支)
2015-08-11 15:27
411 查看
Git 简单操作(拉取,推送 ,合并分支,切换分支)
一.git一些简单代码合并命令
1.git status 查看状态2.git branch - a 查看分支
3.git checkout master 切换master分支
4.".git add" and/or "git commit -a” and/or “git add .” and git commit -m “xx” 提交修改内容
5.git pull 拉取
6.git merge niejia 合并分支
7.git push origin master 推送到master 分支
二.git操作扩展
原文:usage: git [--version] [--help] [-C <path>] [-c name=value]
[--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
<command> [<args>]
The most commonly used git commands are:
add Add file contents to the index
bisect Find by binary search the change that introduced a bug
branch List, create, or delete branches
checkout Checkout a branch or paths to the working tree
clone Clone a repository into a new directory
commit Record changes to the repository
diff Show changes between commits, commit and working tree, etc
fetch Download objects and refs from another repository
grep Print lines matching a pattern
init Create an empty Git repository or reinitialize an existing one
log Show commit logs
merge Join two or more development histories together
mv Move or rename a file, a directory, or a symlink
pull Fetch from and integrate with another repository or a local branch
push Update remote refs along with associated objects
rebase Forward-port local commits to the updated upstream head
reset Reset current HEAD to the specified state
rm Remove files from the working tree and from the index
show Show various types of objects
status Show the working tree status
tag Create, list, delete or verify a tag object signed with GPG
'git help -a' and 'git help -g' list available subcommands and some
concept guides. See 'git help <command>' or 'git help <concept>'
to read about a specific subcommand or concept.
翻译:
最常用的GIT中的命令是:
添加文件的内容添加到索引
通过平分二进制搜索查找引入了错误的变化
分支列表,创建或删除分支机构
收银台结帐分支或路径工作树
克隆克隆一个仓库到新目录
提交记录更改库
提交之间差异显示修改,提交和工作树等
从另一个存储库获取下载对象参
匹配模式的grep打印线
初始化创建一个空的Git仓库或重新初始化一个现有的
日志显示提交日志
合并连接两个或更多的发展历程在一起
MV移动或重命名一个文件,目录或符号链接
从拉取,并与另一个仓库或当地分支机构整合
推更新远程裁判以及相关对象
衍合转发端口本地提交更新后的上游头
RESET复位当前磁头到指定的状态
RM从工作树从索引中删除文件
节目显示各种类型的对象
状态显示工作状态的树
标签创建,列表,删除或验证与GPG签署了标记对象
“git的帮助-a”和“git的帮助-g名单可用的子命令和一些
概念指南。见'git的帮助<命令>“或”git的帮助<概念>“
阅读有关特定子命令或概念。
相关文章推荐
- JAVA在ACM/各类在线笔试题中的使用
- Android Volley框架(二):ImageRequest、ImageLoader、NetworkImageView
- TabBarViewController标签导航控制器全局控制
- 2015年8月11日开通了这个博客
- Android编译系统参考手册
- windows下扩展python遇见(Unable to find vcvarsall.bat)问题
- 【技术】jQuery的selector & context
- hdu find the most comfortable road
- eclipse使用技巧
- Prime Ring Problem
- 图像中显示文字
- Intellij 编译时报 未结束的字符串字面值
- Android Context, What Context?
- Intellij 编译时报 未结束的字符串字面值
- Codevs3287 货车运输
- [NOIP2014]生活大爆炸版石头剪刀布
- LeetCode -- Flatten 二叉树
- AJAX返回的三种数据格式
- Python Requests
- 给网站添加X-UA-Compatible标签