Git

2019-09-30

The Beast of a Version Control System

At first I was shit scared using the version control system Git. Time has past and today I am a huge fanboy of it. On this page, I collect all the nice little things I’ve crossed so far in the wild wide world about Git. If you have some other cool stuff which I could add, please ping me, thanks.

Not only the selection and usage of a tool makes you invincible, no, mastering by explaining it to others is what makes you a real superhero.

gentle intros and a bit more

setting up a repository

how to setup git

git config

git commit

git fetch

git fast forward

  • What? If Master has not diverged, instead of creating a new commit, git will just point master to the latest commit of the feature branch. This is a “fast forward.” There won’t be any “merge commit” in fast-forwarding merge.
  • Fast forward merge or rebase ? A fast forward merge is a merge where the HEAD of the target branch (e.g. master) can just be forwarded to the latest commit of the pulled (e.g. feature/xyz) branch. If there are commits in between, because the target and the pulled (PR) have diverged, there is no fast forward merge possible and a merge commit will be created! A merge commit contains two parent commit, the latest of the target branch (e.g. master) and the latest of the be pulled (e.g. feature/xyz) branch. A merge commit incorporates the changes from these two parent commits into the target (e.g. master) branch.
  • What does fast-forward mean?
  • Fast forward and branch mgmt
  • Fast forward git merge

git merge

git merge vs git rebase

git push

git reset and revert

git cherry-pick

git configuration

git flows/branching models

git rerere

git log and diff

.gitignore

commit message

git hooks

cheat sheets

git repository manager

Here are just a few repository managers which you can choose from. All of them emphasise the collaborative work for a team.

Git clients

tricks

  • If you use GitHub as remote repository manager and you do pair programming, add this to the commit message and then you and your pair will get the git commit credit:
    Co-authored-by: your name <yourgitemailaddress>
    Co-authored-by: your co-author <theirgitemailaddress>
  • A visual log for Git command line

talks & workshops

doc & books

other nifty stuff

cool blog posts

Currently I can offer two things about Git: a talk and a hands-on workshop. To get you ready for the workshop, I made a small GitHub repo:

Follow me on GitHub ;-)


Comments: