xgqfrms / git-testing-all-in-one

git-testing-all-in-one 🚀👻✅
https://www.cnblogs.com/xgqfrms/p/14821373.html
MIT License
1 stars 0 forks source link

gir reset #4

Open xgqfrms opened 4 years ago

xgqfrms commented 4 years ago

git reset

git reset && git push with force overwrite

# master commit uid
$ git reset --hard b9e3f7f2f66674901b467183dd81d493e50677f5
# git push branch_name --force

# local master
$ git push origin master --force

# remote master
$ git push origin/master -f

refs

https://stackoverflow.com/questions/18137175/in-git-what-is-the-difference-between-origin-master-vs-origin-master

https://git-scm.com/docs/git-reset