DevOps
git
Dec 3, 2018     2 minutes read

1. What is git and why would you use it?

2. A “Hello world” example

As you may have noticed, my posts usually contain a section called ‘A “Hello World” example’, but not this time. There are so many tutorials and books available on the Internet that I am sure you will find something suitable for yourself very quickly.

3. ‘6 commands’

Knowing 6 git commands is a humorous description of a basic knowledge of git. But there is much truth in it: you only need 6 commands to work pretty efficiently with git. These are:

If you know all of them, you can update your LinkedIn profile with “knowledge of git”. If not, I recommend youtube tutorials, like this one:

4. Slightly more advanced subjects

git rebase

In it’s consequences, git rebase is equivalent to merge, but there are certain differences:

In general, when you work on a specific project with your colleagues, I recommed using rebase, as chronological order is not that important. Thanks to rebase you can scroll the repo log and see the next functionalities (branches) appearing in order. If you even decide to give them special tags, boy, it really helps to kepp order!

Here are a few links which contain more information about rebasing: one, two.

completely remove a submodule

Just replace the <name> with your submodule’s name.


remove a remote branch

Once you do rebase and merge, before push your changes you may want to delete the merged branch first. You can do it with:


5. Subjects still to cover: