How to move changes from previous branch of the current branch?

Viewed 24

I have Branch A that has some changes and Branch B that has changes too, but I want to the changes of branch A do not appear in branch B.

My commits look something like this:-

commit 3 - branch B
commit 2 - branch A
commit 1 - branch A
master

I want commit 3 - branch B to after master or to remove the changes made in branch A from branch B, is it possible?

1 Answers

Branch you wanted get the uncommited changes from:

git stash 

then go to branch you wanted to apply the changes

git checkout {branch-name}
git stash apply
Related