Git Book读书笔记--git常用命令总结

git常用命令总结

设置与配置
git config


# 配置用户名和邮箱
git config --global user.name [user_name]
git config --global user.email [user_email]


# 配置别名
git config --global alias.co checkout
git config --global alias.cm commit
git config --global alias.br branch


# 配置pull命令默认使用rebase
git config --global pull.rebase true

git help
获取与创建
git init
git clone
快照基础
git add
git status
git diff
# 简单的启动一个外部工具来为你展示2棵树之间的差异
git difftool
git commit


# 撤销提交,然后重新提交
git commit --amend
# 主要用来根据你传递给动作的参数来执行撤销操作
git reset

# 撤回'commit_id'操作,如commit后撤回或rm后撤回
git reset --hard 'commit_id'
git rm
git mv
git clean
分支与合并
git branch
git checkout
git merge
git mergetool
git log


# 提交记录一行显示
git log --pretty=oneline
git stash
git tag
项目分享与更新
git fetch
git pull
git push
git remote
git archive
git submodule
检查与比较
git show
git shortlog
git describe
调试
git bisect
git blame
git grep
补丁
git cherry-pick
git rebase
git revert
邮件
git apply
git am
git format-patch
git imap-send
git send-email
git request-pull
外部系统
git svn
git fast-import
管理
git gc
git fsck
git reflog
git filter-branch

推荐:阮一峰博客–常用 Git 命令清单

Git Book常用命令

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值