R
R
run1822019-01-15 22:26:28
git
run182, 2019-01-15 22:26:28

How to sync git branches after revert in one of them?

There are 2 branches master and dev. In master, a commit was reverted, in which a merge from dev was made. After that, several files do not want to be synchronized - git reacts as if everything is already synchronized and there are no differences. How can branches be synchronized?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
run182, 2019-01-16
@run182

I solved the problem by cloning the repository again, because. there are redundant commits in that. But I'm sure there must be a better solution.

A
Andrey, 2019-01-15
@VladimirAndreev

If the last commit to master was reverted:
Do a git reset --hard on the last valid commit to master.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question