git branching

Git Branching, merge and rebase

  1. Git doesn’t store data as a series of changesets or difference,but instead as a series of snapshots.
  2. When you make a commit, Git stores a commit object that contains a pointer to the snapshot of the content you staged.
  3. Zero parents for the initial commit, One parent for a normal commit and multiple parents for a merge of two or more branches.
  4. In Git, theres are two main ways to integrate changes from one branch into another: the merge and the rebase.
  5. The easiest way to integrate the branches merge command. It performs a three-way merge between the two latest snapshots and the most recent common ancestor of the two.
  6. Rebasing command, you can take all the changes that were committed on one branch and replay them on a different branch.
  7. Git fast-foward after rebasing
  8. Do not rebase commits that exist outside your repository and people may have based work on them.
  9. History: a record of what actually happened.
  10. Another concept of history: story of how your project was made.