M
M
Maybe_V2016-06-07 19:16:40
git
Maybe_V, 2016-06-07 19:16:40

How to move commits from one branch to another?

Accidentally made commits in the wrong branch!
As a result, 10 commits have accumulated in a branch that has nothing to do with the right one!
How can I move commits from one branch to another?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Movchan, 2016-06-07
@Alexander1705

git rebase
P.S. Don't move commits you've already pushed to a public repository.

D
devian3000, 2016-06-07
@devian3000

Look towards cherry-pick.
But it's better not to do that anyway.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question