5
I had a merge conflict problem in git. This problem happened when two people were making the same modifications to the same file. The first person committed and I went to do another commit after it. git refused and I tried three more times. The fourth time git let the commit be performed, but the web system had a broken part.
So I did a revert on a working commit and after that, I did a checkout for the same commit that was working. But now when I give git push, it appears that the directory is empty and has nothing to go up.
Does anyone have a solution to get the repository back to normal ? Thank you.
Is the master a third branch, or is it one of yours?
– Sergio
first very important detail, always pull before push. Another tip to avoid this type of situation is to use git stash to put the changes in a stack if you need to recover them after that.
– pmargreff
master is a branch of mine. Thanks for the @pmargreff tip. I managed to fix it. I used the following git push -f origin <commit> :master command. Thanks for the comments.
– Jéssica Dias
You can answer your own question in this case, so you help those who have the same problem in the future.
– pmargreff