Git

Mastering git, Part 13, Detached HEAD in Git

Detached HEAD Before everything, let’s have a look at some stuff. Everything in Git is about commits, and many git commands accept commits as a parameter, i.e.

We have to understand how to reference commits. Hash The SHA-1 hash of a commit is the most straightforward method to refer to it. In the

Mastering git, Part 13, Detached HEAD in Git Read More »

Mastering git, Part 11, View git history (commit log) of specific lines of code in a file

git blame The git blame command is used to know who/which commit is responsible for the latest changes made to a file. The author/commit of each line can also been seen. git blame does not show the per-line modifications history in the chronological sense. It only shows who was the last person to have changed …

Mastering git, Part 11, View git history (commit log) of specific lines of code in a file Read More »

Mastering git, Part 4, git merge, git diff with GUI tools

Diff Before following this post, make sure you have already set up everything from my other post regarding the configuration of the git environment. Diff command will allow you to compare two different commits, let’s set up a repository:

Now in the second repository, we make some changes:

now let’s back to the first repository and see …

Mastering git, Part 4, git merge, git diff with GUI tools Read More »