GIT Rebase vs Merge
How does Git Work? For understanding the working of git, we need to understand the two fundamental concepts in git which is git commit and git branch. Let’s understand these two terms respectively. What is a Commit? Commit is defined as the location where the code and its changes are stored. In git merge, looking at the end diagram, one can make out Commit A and B came from the feature branch. However, in the git-rebase diagram, it is difficult to understand where commits A and B came from. Therefore, we do git merge when we want our team to understand logs in a way where they can identify where each commit is coming from. We use Git Rebase when the logs of the repository will not be referred by anyone else. To summarise, we can use Git Rebase, when we are working on branches, which cannot be seen by other developers. And we use Git Merge when the target and source branch can be viewed by other developers. How can Git Rebase and Git Merge be used together? Let us take an ex...