I have a pull request from a source branch to a target branch.
I have run:
$> git checkout target-branch
$> git pull
$> git checkout source-branch
$> git merge target-branch
There were some conflicts which I have resolved with:
$> git mergetool
This merge wasn't 100% successful, so I manually removed the conflict artefacts (>>>>>>
etc) from the files and responding to the prompt:
>Was the merge successful? [y/n]
with y
.
So I am happy with the state of all of the files in my source branch, but my CLI now shows:
dir/to/my/project (source-branch|MERGING)
$>
How do I tell git that I'm happy with the merge I've done?
You can undo a Git merge using the git reset –merge command. This command changes all files that are different between your current repository and a particular commit. There is no “git undo merge” command but the git reset command works well to undo a merge.
Most likely you need to git commit
to commit your merge to your local repository.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With