3 ms·
The thing that really put git together for me was understanding that each commit id was based on the previous commit id. So you could have two branches with th
by nickthemagicman 7y ago
The thing that really put git together for me was understanding that each commit id was based on the previous commit id. So you could have two branches with the exact same code committed...and have different commit id's.
That explains rebases...you take one branch and put it on top of another branches commits but REWRITE those new commit id's based on the new branches commits.
Merges, you keep the same commit ids but smush two branches together.
Also, when I do a git reset HEAD~1 and make changes I can force push and understand the my new code is overwriting the last commit.
I think that really helped my understanding of git.