P
P
Platon Lukyanov2021-10-21 22:08:10
git
Platon Lukyanov, 2021-10-21 22:08:10

How to move a branch in Git to the successor of the previous commit?

6171ba1a47c7b874297640.png

What is the correct way to move the react-app branch to the latest commit and merge it with deps?

PS: New to Git

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Kuznetsov, 2021-10-22
@platonlukyanov2007

This is called rebase. We transplant one branch to the top of another branch.
git rebase deps react-app
But your react-app branch is already up and running, so it will have to be forced to update in the external repository.
git push --force
And be careful, if someone has already downloaded the react-app branch , then you should warn them so that they delete it from themselves and download it again. Or updated via git pull --rebase

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question