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
• 16,710 points
163 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
312 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,110 points
77 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,380 points
217 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 in Git & GitHub by Sirajul
• 39,540 points
146 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
50,096 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,730 points
407 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,260 points
65 views