Bifalgorithm post

Git Merch vs Git Previous This is one of the most asked questions during the software engineering interview Welcome to episode 1 of learning it in 40 seconds This is the master branch, there is a girl named Alice and let's say Alice creates another branch from Commit C which is known as Feature Branch So now Alice is working on Feature Branch and she commits two features in it D and E While other developers have pushed their features on the master branch which is F and g so if the alice do git merge master on her feature branch what happens is git will create a new commit which is known as h right now that will include the changes from the master branch and the feature branch commit history is preserved using the git merge master instead of that if alice do git rebase master on the feature branch what happens is git will delete all the commits that in the master branch. So, commit history will get rewrite since the commits has been deleted and has been abandoned at the end. That's it guys, I hope your confusion between these two have been cleared. If you want more content like this, make sure you follow my page.

Git Merch vs Git Previous This is one of the most asked questions during the software engineering interview Welcome to episode 1 of learning it in 40 seconds T…

Ideas in this flowchart

  • Git Merge vs Git Rebase
  • Scenario Setup
  • Master Branch
  • Feature Branch
  • Alice's Actions
  • Git Merge Master
  • New Commit H Created
  • Commit History Preserved
  • Git Rebase Master
  • Commits Deleted
  • Commit History Rewritten
  • Conclusion
Feed/

Git Merch vs Git Previous This is one of the most asked questions during the software engineering interview Welcome to episode 1 of learning it in 40 seconds This is the master branch, there is a girl named Alice and let's say Alice creates another branch from Commit C which is known as Feature Branch So now Alice is working on Feature Branch and she commits two features in it D and E While other developers have pushed their features on the master branch which is F and g so if the alice do git merge master on her feature branch what happens is git will create a new commit which is known as h right now that will include the changes from the master branch and the feature branch commit history is preserved using the git merge master instead of that if alice do git rebase master on the feature branch what happens is git will delete all the commits that in the master branch. So, commit history will get rewrite since the commits has been deleted and has been abandoned at the end. That's it guys, I hope your confusion between these two have been cleared. If you want more content like this, make sure you follow my page.

"git merge vs git rebase"

👍
0
0 comments0 shares

Sign in to view and post comments.