Reputation: 15214
What is the best way to stash working tree, update the local branch and then merge the both files modified either on local and on remote branch?
I'm doing as following:
git stash
, the shortcut for git stash save
and save my working treegit pull
, to update my local branch.git stash pop
to remove a single stashed state from the stash list and apply it on top of the current working tree state.This isn't that bad, altough the merge part isn't the best. I just want to merge the changes, if possible with mergetool. How can I do it?
Upvotes: 1
Views: 109
Reputation: 15099
Why don't you just commit and rebase?
git commit -a
git pull --rebase
*fix merge conflicts*
Then if you want to append to that commit you can do
git commit -a --amend
Then if you want to uncommit the commit you just made, but still save your changes, do a soft reset:
git reset --soft HEAD^
Upvotes: 2