You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Stash error with conflicted file upon new branch creation due to untracked files #8084
When switching branches and carrying over changes that produce a conflict there is an edge case when untracked files are involved in the conflict. Desktop stashes the untracked file, creates the new branch, and tries to apply the stashed changes on the new branch. But if the new branch already contains a file that corresponds to the stashed untracked file, Git throws an error and doesn't allow the changes to be applied.
For reference -- I pulled this out as a separate issue from #7827 (comment). It's a distinct bug and pertains specifically to untracked files being stashed as part of checking out a new branch.
checkout branch-a and create new file file.txt with conflicting changes. do not stage or commit.
checkout new branch branch-b based off of master. select option to carry over changes. (note: you also hit the error by checking out master instead of creating a new branch)
Expected Behavior
branch-b is checked out and file.txt shows conflicting changes
I noticed as part of this bug that the stash sometimes results in the user being unable to click discard or restore. Switching tabs and returning resolves it. I suppose this will be moot once the bug fix comes in.
I encountered this recently as well and it caused an infinite loop of GitHub Desktop stashing local changes & retrying. I had to quit the application, pop one of the many stashes, and clear the others before manually handling the untracked file to get around the issue.
Activity
Stage untracked files before stashing
tierninho commentedon Aug 9, 2019
I noticed as part of this bug that the stash sometimes results in the user being unable to click
discardorrestore. Switching tabs and returning resolves it. I suppose this will be moot once the bug fix comes in.benplay2 commentedon Aug 19, 2019
I encountered this recently as well and it caused an infinite loop of GitHub Desktop stashing local changes & retrying. I had to quit the application, pop one of the many stashes, and clear the others before manually handling the untracked file to get around the issue.