Head commit : In Git, the commit you are currently on is known as the HEAD commit. In many cases, the most recently made commit is the HEAD commit. To see the HEAD commit, enter: git show HEAD The output of this command will display everything the git log command displays for the HEAD commit, plus all the file changes that were committed. For example: Enter the command to show the HEAD commit. Notice the output. The ghost's most recently added line is in green text. Git Checkout: What if you decide to change the ghost's line in the working directory, but then decide you wanted to discard that change? You could rewrite the line how it was originally, but what if you forgot the exact wording? The command git checkout HEAD filename will restore the file in your working directory to look exactly as it did when you last made a c...
All the basics about how the git works and collaborations on github.