[0] Git

At the moment I am especially interested in Git and have recently passed two courses devoted to this technology. One course was from the University of Tampere, which I’m going to include in my degree. And the other one is a course called Git In-depth from Frontend Masters.

Actually, both courses were quite impressive, and I have learned a lot about Git. So, there are several points I found out and which I found particularly important as my personal top-8:

1). A remote repository

Adding and deleting:

2). Branches

With switching to a new branch and without it:

3). Stashing

There is a simple example of using stashes below. It is quite handy when you want to save some changes but do not want to commit it yet.

4). Tags are not something I use a lot, but anyway I think they could be useful for some occasions.

You should use git push --tags (or git push tag_name) to push tags to a remote repository.

5). Git merge. Fast-forwarding by default vs no fast-forward.

git merge exercise3:

I got the difference between git merge some_branch and git merge --no-ff some_branch. It is becoming obvious when you use git log --graph.

git merge --no-ff exercise3:

6). Git log - Grep, filter, since

There are some more "advanced" git features, like grep, filter and since:

7). Git log - no-pager and oneline

8). Git commit --amend

Amend is a very useful commit "editing" tool. Actually, it's not exactly editing, but as we can see from the sha of commits - c8a341a vs dcbdc49, amend creates a new commit from the last one.


Finally, I realized that git pull = git fetch + git merge. Amen.

Tags: coding, git, github, newbie

← Back home