Skip to content

Latest commit

 

History

History
11 lines (9 loc) · 496 Bytes

8. Discard all changes in your local repo to exact state in remote.md

File metadata and controls

11 lines (9 loc) · 496 Bytes

8. Discard all changes in your local repo to exact state in remote

You have made a couple of changes and commits in your local repo branch. You have rewired and now you are asking yourself, "Why did I even make these changes in the first place?"

So you want to forget everything on your current local branch and make it exactly the same as what is in the remote's main branch.

Just undo like:
git reset --hard origin/main
WARNING: Uncommitted changes will be lost permanently.