Git is a what's called "version control system"; its name is pronounced as "Git" instead of "Jit" (G as in G for goat, not G for general). it can allow you to manually record the changes of files.

for me, i simple use it to revert files to a previous state. in other words, i simply use the powerful Git as sort of a multi-version super file-saver.

Git is useful to anyone who wants to keep track and have control over changes of his files. in order to help you learn about Git, below i will state the most important things in terms of starting learning Git.

  • Git originally doesn't have a GUI, and is run from Bash.
  • Git stores the information in a hidden folder normally named ".git".
  • the collection of data regarding the certain set of files you desire to track is called a "repository", or "repo".
  • each saved version of the repo is called a "commit". "commit" is also a verb, meaning to save the current state of the files into a commit.
  • the action of restoring the tracked files back to the status of one of the commits is called "checkout".
  • as Git sees it, there are three different states/statuses a tracked file could be in: working, staged, committed.
  • you may find aliases helpful in terms of typing Git commands.

in my case where i just use Git as an approach to accessing different versions of  a file, my most used commands are:

  • git init
    creates a Git repo, which is stored in the ".git" directory. the first command to run. repo would be created in the location where the command is run.
  • git add
    start tracking files i desire to track
  • git  commit
    save the current status of the track files (or say repo) into a commit
  • git branch
  • git checkout
    restore the status of the repo (or say tracked files) (back) to how they are like during they're once committed.
  • gitk
    a simple built in GUI tool for Git on the Windows platform.

further reading: