Git Essentials

Foundation of git

Git is a popular version control system. It was created by Linus Torvalds in 2005 and has been maintained by Junio Hamano since then.

It is used for:

  • Tracking code changes

  • Tracking who made changes

  • Coding collaboration


Keyboard And Wood Dice With The Word Setup Stock Photo, Picture And Royalty  Free Image. Image 36961709.

  1. To Check the User-Name & Email in git

Setup & init

To get user information, initializing and cloning repositories

  • initialize an existing directory as a Git repository

initialize an existing directory as a Git repository

  • retrieve an entire repository from a hosted location via URL

Stage and Snapshot

Working with snapshots and the Git staging area

  • show modified files in working directory, staged for your next commit

  • add a file as it looks now to your next commit (stage)

  • unstage a file while retaining the changes in working directory

  • diff of what is changed but not staged

  • diff of what is staged but not yet commited

  • commit your staged content as a new commit snapshot

Branch & Merge

Isolating work in branches, changing context, and integrating changes

  • list your branches. a * will appear next to the currently active branch

  • create a new branch at the current commit

  • switch to another branch and check it out into your working directory

  • merge the specified branch’s history into the current one

  • show all commits in the current branch’s history


That's all you should know about the git basics, What I love about this code which are very easy to understand .

Although, to be completely honest, I'll probably still use git every now and then, just for old times' sake.