Skip to content
Discussion options

You must be logged in to vote

git merge and git rebase both integrate changes from one branch into another, but they handle the commit history differently.

git merge

Merge combines the two branch histories and usually creates a new merge commit.

For example:

A---B---C  main
     \
      D---E  feature

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by vanshu51145
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Repositories The core of version-controlled code storage Question Ask and answer questions about GitHub features and usage Welcome 🎉 Used to greet and highlight first-time discussion participants. Welcome to the community! source:ui Discussions created via Community GitHub templates
2 participants