by jopicornell · 1y ago · 0 comments
You should avoid reset --hard because it will delete all your uncommited, and you could end up in situations where that's really bad. Using reset --keep will keep uncommited changes, and failing if any uncommited change cannot be kept.
git add -A
git stash
git reset --hard
git stash pop