Open Bartozzz opened 6 years ago
I was able to resolve the conflict manually via the CLI:
$ git pull
Auto-merging package.json
CONFLICT (content): Merge conflict in package.json
Automatic merge failed; fix conflicts and then commit the result.
$ git add package.json
$ git commit -m "Merged package.json"
[master 319618c] Merged package.json
But it's still impossible to do the equivalent in Atom.
This is occurring on both Windows and GNU/Linux as well,
Same issue here. Click to use local version -> Stage the files in the merge conflicts section -> File disappears from the Git panel completely as it matches the local version. Then you're stuck as you can't pull during a merge, can't push without first pulling, and can't commit as there are no staged files to commit. Really frustrating having to fix it manually each time when the UI should handle it correctly.
This is happening to me too,I found that if you manually select which part of the code you want and eliminate the markers by hand it works
Same issue. When I click stage changes it's didn't appear at staged panel and commit button not working. From command like works good.
Same issue. any workaround or info into solving it?
In my case, when I got this message, I just needed to save the file in Atom (File>Save) and then I just clicked Stage or Stage All in the Git side panel and the files were staged (as if I typed "git add ." from the CLI). Hope this helps someone.
This issue reproducible also with VScode and native Terminal (MacOS). Does anyone know how to solve this problem?
@jonathan3087's solution works for me. When I get the dialog box "file contains merge markers", I cancel, save the file, stage it, and commit. Works like a charm:)
This is an infuriating problem - when I clean up the file and save it, it still does not permit the merge to proceed. The "solutions" above are nothing more than aborting the operation and trying to work around it - this is inconvenient and error-prone.
git commit -m "MErge remote-tracking...."
if commitIsEnabled function which now looks as follows:
commitIsEnabled(amend) {
return !this.props.isCommitting &&
(amend || this.props.stagedChangesExist) &&
!this.props.mergeConflictsExist &&
this.props.lastCommit.isPresent() &&
(this.props.deactivateCommitBox || (amend || this.isValidMessage()));
}
looked like this:
return !this.props.isCommitting &&
(amend || this.props.stagedChangesExist || this.props.isMerging) &&
!this.props.mergeConflictsExist &&
this.props.lastCommit.isPresent() &&
(this.props.deactivateCommitBox || (amend || this.isValidMessage()));
}
it would probably work fine (not sure). Would like to have feedback from someone from the Atom core team.
@mstmustisnt Huh, would it be that easy? I'd take a PR with that and a test 😄
In my case, when I got this message, I just needed to save the file in Atom (File>Save) and then I just clicked Stage or Stage All in the Git side panel and the files were staged (as if I typed "git add ." from the CLI). Hope this helps someone.
that worked. just saved the file
I had to not only save the file manually, as others have described, but also introduce a change into the file, e.g. a new empty line or a comment, in order to be able to commit the merge.
Description
I have modified a file and tried to push the change, which resulted in a conflict. Atom is asking me to merge conflicts first, but there's no way to stage changes/resolve the conflict if I use changes from the last local commit. It's quite confusing that the "Use me" button doesn't actually allow me to merge anything.
Steps to Reproduce
Merge conflicts view:
I clicked on the first "Use me": so
package.json
matches the local version from the last commit:When I try to stage the changes, Atom says that merge markers are still there:
When I click on "Stage", it would commit the merge markers (unwanted behaviour):
When I save the file first and then try to stage it, it's impossible because the file hasn't changed since the last commit:
Expected behavior:
Automatically resolve the conflict when i click on "Use me" or at least be able to stage the file without merge markers.
Versions
macOS High Sierra v10.13.3 (17D47)