Answer the question
In order to leave comments, you need to log in
How to roll back commits in a remote repository to a given one?
In the remote repository in the master branch there is such a set of commits
A - B - C - D It is
necessary to rollback for all clients to commit A, and the changes included in commit B must be reset to a separate branch. Commits C and D can be sacrificed.
What is the correct sequence of actions in this case?
Answer the question
In order to leave comments, you need to log in
On one client:
git branch feature_branch B -- создать ветку на основе B
git checkout master
git reset --hard A -- сброс мастера на A
git push -f -- принудительное обновление удалённой ветки
git fetch --all -- получить свежие данные с сервера
git checkout master
git reset --hard origin/master -- сбросить локальную ветку на удалённую. Имя репозитория (origin) у клиента может быть другим
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question