I have two laptops, each work on the master branch. This morning I forgot to push changes made to the branch before working on the other laptop. So I have two different versions of code. So I pushed the code from the second laptop and then on the first laptop was going to try and merge that version into the remote version.
I tried to merge but I think I bungled it up. I have the following code:
<<<<<<< HEAD
.publicHome-input-neutral {
=======
.signin-input {
>>>>>>> fae264c582726a42c3d09f2ffbbe5b429a471598
line-height: 40px;
height: 40px;
font-size: 18px;
padding: 0px 16px;
border: 1px solid @color-instanty-blue;
border-radius: 6px;
background: #ffffff;
text-align: center;
width: 250px;
color: @color-text-dark;
}
<<<<<<< HEAD
=======
.signin-input.ng-invalid {
border-color: red;
}
As you can see, it's still messy. I have p4merge installed and tried starting it via git mergetool
. I got the message though No files need merging
.
Can one revert to earlier stages before I messed up the merge? Or somehow resolve these files which were wrongly merged?
To see the beginning of the merge conflict in your file, search the file for the conflict marker <<<<<<< . When you open the file in your text editor, you'll see the changes from the HEAD or base branch after the line <<<<<<< HEAD .
Your file ended up in the staged area. To be sure check with
git ls-files --stage <file>
Then add it back as an unmerged file using the -m
option from checkout
.
git checkout -m <file>
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