0

I have two branches X and Y. I've changed something in Y and I want to update X based on the changes in Y. I have changes in X as well, but I don't want to update branch Y.

How do I update one branch based on another without deleting one of them?

2 Answers2

1

Two ways: merging or rebasing.

For merging:

git checkout X
git merge Y

For rebasing:

git checkout X
git rebase Y

Some links below:

garciadeblas
  • 116
  • 1
  • 7
0

Just git checkout X && git merge Y

And solve conflicts if there are any

Loheek
  • 1,205
  • 11
  • 23