You can not merge with your local modifications. Git protects you from losing the potentially important changes.
You have below three options:
· Commit your change using
git commit -m "My message"
· Stash your change using.
Stashing acts as the stack, where you can push the changes, and you pop them in a reverse order.
To stash it, type
Do a merge, and then pull a stash:
git stash pop
· Discard your local changes
using the git reset --hard
or the git checkout -t -f remote/branch
Or: Discard your local changes for the specific file
using the git checkout filename