waldyr.ar
waldyr.ar

Reputation: 15214

How to stash working tree, update the local branch and merge the both modified

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:

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

Answers (1)

Andrew Rasmussen
Andrew Rasmussen

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

Related Questions