question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Merge Conflicts cannot proceed when untracked files exist

See original GitHub issue

Reproduce:

  1. Start with a branch that has 1 or more untracked files.
  2. Merge another branch, like master, into branch, such that conflicts will arise (should NOT be changes that track above file(s)).
  3. Merge Conflict dialog pops up.
  4. Resolve merge conflicts in editor (do not remove untracked files).
  5. Press “Commit Merge” button.
  6. See error: “Could not generate a patch for file foo/bar, patch empty”.
  7. Now you are stuck.

Work arounds:

  1. Move (temporarily) the untracked file(s).
  2. Run git add foo/bar outside of the app.

Neither are particularly pleasing options.

Preferred Solutions:

  1. Quietly skip untracked files for the merge, unless, of course, the merge adds them. Committing anything that didn’t come from the merge makes no sense from the merge’s perspective. (Preferred)
  2. Do (1) and offer options to add or skip untracked. (Ok, but messier merge)
  3. Allow me to exit the dialog and commit when I’m ready, which is sort of how it was before the Merge Conflict dialog was added. (Ok, less messy than (2), but not great)
  4. Warn me that the merge cannot be started with untracked files present, which is hardly better than doing nothing. (Meh, I’ll just end up do work around 1 anyway)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
SleepyJaycommented, Dec 14, 2018

@billygriffin Ya. I didn’t mean to imply otherwise. 😃 👍

0reactions
billygriffincommented, Jan 22, 2019

Thanks for letting us know about this @SleepyJay! Please let me know if things are working better for you now. 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Git Merge Conflicts Although the File Does Not Exist
Generally just creating the files that it says have a conflict, yet don't exist mitigates the problem. It lets you commit the other...
Read more >
Resolving merge conflicts in Git - genomewiki
You resolve a conflict by editing the file to manually merge the parts of the file that git had trouble merging. This may...
Read more >
HELP! "stash pop" is failing and I can't get my work out
Git not doing file-level merging when bringing in "upstream" changes, with automatically making untracked files tracked, if the same-named
Read more >
git stash - Saving Changes | Atlassian Git Tutorial
Stashing your work; Re-applying your stashed changes; Stashing untracked or ignored files; Managing multiple stashes; Viewing stash diffs; Partial stashes ...
Read more >
Git - Cancel Merge - Unfuddle Support
Use git-reset or git merge --abort to cancel a merge that had conflicts. # Reset all the changes back to the last commit....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found