Overwrite local staging or master with remote

Updated . Posted . Visible to the public. Pinned.

Must use Git Bash.

To overwrite local master with remote:

git checkout master
git fetch --all
git reset --hard origin/master

To overwrite local main with remote "upstream"

git fetch upstream
git reset --hard upstream/main
kiatng
Last edit
kiatng
Posted by kiatng to Git (2015-03-26 09:39)