Fatal: cannot do a partial commit during a merge
This error occurs when submitting a single file, which means that the code cannot be partially submitted. The reason is that git thinks that some of your code is not ready to be submitted. For example, without adding
Solutions
1. Submit all
git commit -a
2. If you don’t want to submit all of them, you can do so by adding the – I option
git commit file/to/path -i -m "merge"
The above situation generally occurs when the local working copy conflict is resolved. After the local file is modified (manual merge), it is necessary to add and submit it, so that the local version is in the clean state. In this way, GIT pull will no longer report errors
Similar Posts:
- Git- Fatal: cannot do a partial commit during a merge
- [Solved] Git conflict Error: commit your changes or stash them before you can merge
- [Solved] Aborting commit: ‘XXXXXXXX’remains in conflict error
- [Solved] Please clean your repository working tree before checkout
- [Solved] Git pull error: You have not concluded your merge (MERGE_HEAD exists)
- Please, commit your changes or stash them before you can merge
- Idea uses git’s pull command to report error 1
- [Solution] fatal: ambiguous argument ‘stash@‘: unknown revision or path not in the working tree.
- [Cherry-pick Failed Error merging] You have not concluded your cherry-pick (CHERRY_PICK_HEAD exists). Please, commit your changes before you merge.