Below is the table of Git commands
| Command | Description | Example |
|---|---|---|
| git help | Show help on a command | $ git help push |
| git config | Configure Git | $ git config --global … |
| source | Activate Bash changes | $ source ~/.bash_profile |
| mkdir -p | Make intermediate directories as necessary | $ mkdir -p repos/website |
| git status | Show the status of the repository | $ git status |
| touch | Create an empty file | $ touch foo |
| git add -A | Add all files or directories to the staging area | $ git add -A |
| git add | Add given file or directory to staging area | $ git add foo |
| git commit -m | Commit staged changes with a message | $ git commit -m "Add thing" |
| git commit -am | Stage and commit changes with a message | $ git commit -am "Add thing" |
| git diff | Show differences between commits, branches, etc. | $ git diff |
| git commit --amend | Amend the last commit | $ git commit --amend |
| git show | Show the details of indicated commit | $ git show abcd123… |