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
• 17,750 points
229 views

1 answer to this question.

+1 vote

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,400 points
378 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,190 points
140 views
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,400 points
305 views
0 votes
1 answer
0 votes
2 answers

What is git rebasing?

In Git, there are two main ways ...READ MORE

answered Aug 2, 2019 in Git & GitHub by Sirajul
• 45,960 points
198 views
0 votes
3 answers

Git push vs git push origin

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

answered Apr 23, 2019 in Git & GitHub by Hiran
65,593 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,840 points
538 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,290 points
85 views