Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is the difference between rebasing and merge in git?



What is the difference between rebasing and merge in git?..

Answer / Amit Kumar Batar

Rebasing and merging are two common methods for integrating changes from one branch to another in Git. Here's a summary of their differences:n1. Rebase: When you rebase, you move or combine a feature branch onto another branch. This results in a linear history where the features are built on top of the latest version of the target branch, rather than having multiple independent lines of development. However, rebasing can be confusing if others are also working on the same branches as it will appear as though commits are being rewritten.n2. Merge: When you merge, you combine changes from another branch into your current branch. This creates a new commit that represents the merge point between the two branches. The original commits remain intact, and there's no linearization of the history like with rebasing. Merging is typically less disruptive to others working on the same project because it doesn't change the commit history.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Git Interview Questions

What is the function of ‘git reset’?

1 Answers  


In git, how would you return a commit that has just been pushed and made open?

1 Answers  


What is git and why do we use it?

1 Answers  


What is a repository and how will you create it?

1 Answers  


How do you configure a git repository to run code sanity checking tools right before making commits, and preventing them if the test fails?

1 Answers  


What is git fork? What is the difference between fork, branch, and clone?

1 Answers  


What does ‘hooks’ comprise of in git?

1 Answers  


What is ‘head’ in git?

1 Answers  


What is the command you can use to write a commit message?

1 Answers  


What is the function of ‘git stash apply’?

1 Answers  


What is the syntax for “Rebasing” in Git?

1 Answers  


What is a git commit and what does the commit object contain?

1 Answers  


Categories