Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git merge & rebase: Do they only affect the currently checked out branch?

Is it correct to say that the following two commands

git merge X
git rebase X

only change/affect the current branch and not X (or any other branch)?

I think I understand what both commands do, but I want to make sure my assumption is correct.

like image 634
Amelio Vazquez-Reina Avatar asked Mar 14 '14 19:03

Amelio Vazquez-Reina


1 Answers

Yes, your assumption is correct. Both commands will affect only the branch you're on when you run the command.

like image 163
Ryan LaNeve Avatar answered Oct 05 '22 06:10

Ryan LaNeve