Reputation: 189
If I do a git reset --hard upstream/main
, will also my local branches be deleted by that command?
Upvotes: 0
Views: 567
Reputation: 165298
git reset
does not delete branches.
git reset --hard upstream/main
says to move the currently checked out branch to the same commit as upstream/main, and to clear your staging area of any changes, and to overwrite your files with the versions at upstream/main.
Your current branch will be at the same commit as upstream/main, and any staged or unstaged changes will be gone.
Upvotes: 1