文章目录
  1. 1. reset至某一个节点
  2. 2. 低版本branch覆盖当前
  3. 3. github上Contributions不更新

reset至某一个节点

git log //查找要还原的节点id
git reset –hard “id”

可以还原由git rm删除的文件

低版本branch覆盖当前

ERROR LOG:

hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: ‘git pull …’) before pushing again.
hint: See the ‘Note about fast-forwards’ in ‘git push –help’ for details.

Updates were rejected because the tip of your current branch is behind

可强制覆盖

git push -u origin master -f

github上Contributions不更新

a.对活动项目打上星星
b.查看user.email的邮箱与github上的是否一致

git config –list //查看信息
git config –global user.name “username” //设置username
git config –global user.email “email” //设置Email
git config –global core.editor “emacs” //Emacs默认编辑器

文章目录
  1. 1. reset至某一个节点
  2. 2. 低版本branch覆盖当前
  3. 3. github上Contributions不更新