工作中常用的git命令
2016-09-22 20:56
155 查看
可以使用git --help 查看常用的git命令
The most commonly used git commands are:
add Add file contents to the index
git add . // 当在本地对代码进行修改后,把修改的文件添加到索引库中,
bisect Find by binary search the change that introduced a bug
branch List, create, or delete branches
git branch -a // 列出所有的分支
git branch // 列出本地分支
git branch -d branch // 删除branch分支
checkout Checkout a branch or paths to the working tree
git checkout branch // 切换到branch分支
git checkout -b branch remote/branch // 建立远程分支相关的本地分支
git checkout . // 撤销修改
clone Clone a repository into a new directory
commit Record changes to the repository
git commit . // 将修改提交到远程库中
diff Show changes between commits, commit and working tree, etc
git diff // 查看修改
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
git log // 查看提交的修改
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
git pull // 同步本地分支和远程分支
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
git reset --hard commit // 设置head值为commit时的提交
rm Remove files from the working tree and from the index
show Show various types of objects
git show file // 查看文件具体信息
status Show the working tree status
tag Create, list, delete or verify a tag object signed with GPG
git config --list
git config --global user.name "name" // 切换git用户名
git config --global user.email "email" // 切换git邮箱
git config --unset para // 删除配置信息
git branch -vv显示本地分支关联的远程分支
The most commonly used git commands are:
add Add file contents to the index
git add . // 当在本地对代码进行修改后,把修改的文件添加到索引库中,
bisect Find by binary search the change that introduced a bug
branch List, create, or delete branches
git branch -a // 列出所有的分支
git branch // 列出本地分支
git branch -d branch // 删除branch分支
checkout Checkout a branch or paths to the working tree
git checkout branch // 切换到branch分支
git checkout -b branch remote/branch // 建立远程分支相关的本地分支
git checkout . // 撤销修改
clone Clone a repository into a new directory
commit Record changes to the repository
git commit . // 将修改提交到远程库中
diff Show changes between commits, commit and working tree, etc
git diff // 查看修改
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
git log // 查看提交的修改
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
git pull // 同步本地分支和远程分支
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
git reset --hard commit // 设置head值为commit时的提交
rm Remove files from the working tree and from the index
show Show various types of objects
git show file // 查看文件具体信息
status Show the working tree status
tag Create, list, delete or verify a tag object signed with GPG
git config --list
git config --global user.name "name" // 切换git用户名
git config --global user.email "email" // 切换git邮箱
git config --unset para // 删除配置信息
git branch -vv显示本地分支关联的远程分支
相关文章推荐
- git学习【2】Git基本工作流程和常用命令
- git常用命令-工作中常用
- git 工作常用命令
- 工作中常用的git命令
- 工作所用的git常用命令
- 工作中常用的几个git命令
- git 工作常用命令
- Git日常工作流程及常用命令
- 我工作中常用的Git命令
- Git常用命令(日常工作需要用到的最实用的命令)
- Git常用命令(日常工作流程)
- git的工作流程加常用命令总结
- 工作中常用的git命令
- git 工作中常用的基础命令
- git 工作笔记(自己常用的 git 命令记录)
- git常用操作---工作中常用的命令
- git 工作中常用命令
- 工作中常用到的git命令
- ### 前端工作中自己常用到的git命令 ###
- GIT 版本控制软件的常用命令记录每次更新到仓库 现在我们手上已经有了一个真实项目的 Git 仓库,并从这个仓库中取出了所有文件的工作拷贝。接下来,对这些文件作些修改,在完成了一个阶段的目标和使用方法