rebasing vs merging

0 votes
What is the difference between rebasing and merging? Where do i use rebasing and where merge?
Dec 13, 2018 in Git & GitHub by Hannah
• 14,080 points
92 views

1 answer to this question.

0 votes

Merging and rebasing are written for the same purpose of incorporating the various changes in your project. The only difference is, reabasing and merging use very different methods to achieve this. 

Let me explain the working with an example, suppose you're working on a particular branch and you've made a few new commits and you're friend is working on the master and he's also made a few new commits. You realize that the new changes he's made might be useful in your branch and now you're confused weather to use rebasing or merging.

If you choose to use the merge option, It creates a new "merge commit" which holds the history commits of both the branches(the branch you were working on and the branch your friend was working on-master). 

If you choosee the rebase option, it moves the entire branch that you've been working onto the master. In simpler terms Moving the base of the branch on different location. 

answered Dec 16, 2018 by Kiyara

Related Questions In Git & GitHub

0 votes
1 answer

Git pull vs Git Fetch

The objective of both these commands is ...READ MORE

answered Apr 26, 2018 in Git & GitHub by DragonLord999
• 8,380 points
187 views
+3 votes
1 answer

Git vs Mercurial

I'm going to put down pros and ...READ MORE

answered Sep 20, 2018 in Git & GitHub by lina
• 8,100 points
50 views
+13 votes
2 answers
0 votes
1 answer
0 votes
1 answer

What is git rebasing?

Git rebasing is moving or combining different ...READ MORE

answered Dec 16, 2018 in Git & GitHub by Kiyara
75 views
0 votes
3 answers

Git push vs git push origin

In simple words git push command updates ...READ MORE

answered Apr 23 in Git & GitHub by Hiran
9,169 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,150 points
199 views
0 votes
1 answer

Hadoop Streaming job vs regular jobs?

In certain cases, Hadoop Streaming is beneficial ...READ MORE

answered Mar 21, 2018 in Data Analytics by kurt_cobain
• 9,240 points
28 views