Github Repo管理重要“灭火救急”技能

  • 放弃本地所有未提交的更改

https://www.v2ex.com/t/66718

git fetch [origin branch-name]
git reset –hard [origin/branch-name]
git clean -df

  • sync forked reposities

https://segmentfault.com/q/1010000002590371

git remote -v

git remote add upstream URL

git fetch upstream
git merge upstream/master

  • revoke commit

https://segmentfault.com/q/1010000000115900

git reset –hard HEAD~1
git push –force

Github Repo管理重要“灭火救急”技能

https://devblog.citruxonve.net/posts/e30cd2ad/

Author

Semprathlon / Simfae Dean

Posted on

05/06/2017

Updated on

07/19/2023

Licensed under

Comments