git-up / GitUp

The Git interface you've been missing all your life has finally arrived.
http://gitup.co
GNU General Public License v3.0
11.48k stars 1.25k forks source link

When trying to pull branch with no conflicting changes: "Working directory contains modified files" #876

Open ahti opened 1 year ago

ahti commented 1 year ago

When trying to pull changes from a remote while having local modifications that do not conflict with changes from the remote, GitUp refuses to merge with the message "Working directory contains modified files" whereas git pull works without issues.

To reproduce, set up two checkouts of the same repo like this:

# create remote and first checkout
git init --bare x
git clone x first

# add some files, commit and push
echo lol > first/a; echo lel > first/b
git -C first add .
git -C first commit -am initial
git -C first push

# second checkout, change file a and push
git clone x second
echo hello >> second/a
git -C second commit -am changes
git -C second push

# back to first checkout, change file b
echo wow >> first/b

With the repos set up, open first in GitUp and try to pull. This will fail with the error message mentioned above. Now git pull on the command line, and the pull will succeed without error, as it should.

Possibly related: #438