git

git合并多个提交, 即同时合并多个commit,一次push

https://www.cnblogs.com/tocy/p/git-rebase-merge-commit.html

git reflog 查看历史所有提交

git rebase 默认master,即变基

git log --pretty=oneline或者git log --oneline

git log --graph 可以查看到所有分支提交

git reset --hard xxx 会使得工作区、缓存区、本地库同步变更指针

git reset --soft xxx 只会变更本地库指针

git reset --mixed xxx 会变更缓存区、本地库指针

常见问题:

  • 配置https链接没反应,现在已经采用token的方式
  • 建议直接配置公钥,采用ssh链接的方式链接,这样最快速,方便

官方手册:https://git-scm.com/docs

原文地址:https://www.cnblogs.com/practitioners/p/15166796.html