美文网首页
GIT常用命令总结

GIT常用命令总结

作者: 王嘉豪_TW | 来源:发表于2018-01-26 10:09 被阅读0次

GIT常用命令总结

GIT内容较多使用方法较为细致,因此本文主要用作概要目录性质,以便以后使用时查询方便。


  1. Getting and Creating Projects

command describe
init Create an empty Git repository or reinitialize an existing one
clone Clone a repository into a new directory

  1. Basic Snapshotting

command describe
add Add file contents to the index
status Show the working tree status
diff Show changes between commits, commit and working tree, etc
commit Record changes to the repository
reset Reset current HEAD to the specified state
rm Remove files from the working tree and from the index
mv Move or rename a file, a directory, or a symlink

  1. Branching and Merging

command describe
branch List, create, or delete branches
checkout Switch branches or restore working tree files
merge Join two or more development histories together
mergetool Run merge conflict resolution tools to resolve merge conflicts
log Show commit logs
stash Stash the changes in a dirty working directory away
tag Create, list, delete or verify a tag object signed with GPG

  1. Sharing and Updating Projects

command describe
fetch Download objects and refs from another repository
pull Fetch from and integrate with another repository or a local branch
push Update remote refs along with associated objects
remote Manage set of tracked repositories
submodule Initialize, update or inspect submodules

  1. Inspection and Comparison

command describe
show Show various types of objects
log Show commit logs
diff Show changes between commits, commit and working tree, etc
shortlog Summarize git log output
describe Give an object a human readable name based on an available ref

  1. Patching

command describe
apply Apply a patch to files and/or to the index
cherry-pick Apply the changes introduced by some existing commits
diff Show changes between commits, commit and working tree, etc
rebase Reapply commits on top of another base tip
revert Revert some existing commits

相关文章

  • git 命令

    Git常用命令总结Git常用命令总结 git init 在本地新建一个repo,进入一个项目目录,执行git ...

  • Git 常用指令

    Git常用命令总结 Git常用命令总结 git init 在本地新建一个repo,进入一个项目目录,执行git i...

  • git相关教程汇总

    1. git常用命令 git常用命令总结git常用命令讲解 2. git教程相关网站 廖雪峰的git教程猴子都能懂...

  • Git与Github的使用总结 - day 03

    git常用命令总结 git配置(config): git仓库(repository): git分支(branch)...

  • Git 常用命令

    Git更多详细介绍 查看git-book git教程 - 廖雪峰 Git 常用命令 总结 $ git init 通...

  • Git常用命令

    Git 常用命令总结 git的一些基础命令 Git常用命令 一般配置 登录git 创建一个文件夹 初始化git仓库...

  • git常用命令

    对git常用命令做个总结,以便以后使用:

  • GIT 常用命令总结

    GIT 常用命令总结 GIT 初始化命令 命令描述git init初始化本地 git 仓库git config -...

  • Git常用命令总结

    Git常用命令总结 1,初始化:git init 创建git仓库 2,配置用户:git config --glo...

  • Git常用命令总结

    我学习效率比较低,关于git差不多学习了两周,总结的常用命令如下: git add .&&git commit -...

网友评论

      本文标题:GIT常用命令总结

      本文链接:https://www.haomeiwen.com/subject/qrliaxtx.html