Git Commit changes before merge
You have three options:
Commit the change using
git commit -m "My message"Stash it
Stashing acts as a stack, where you can push changes, and you pop them in reverse order.
To stash, type
git stashDo the merge, and then pull the stash:
git stash popDiscard the local changes
using git reset --hardor
git checkout -t -f remote/branchOr: Discard local changes for a specific file using git checkout filename
Last updated