Git is the free and open source distributed version control system that's responsible for everything GitHub related that happens locally on your computer. This cheat sheet features the most important and commonly used Git commands for easy reference.
- Add all files in the staging area
- Add a file to the staging area
- Add only certain files to the staging area
- See changes using git add -p
- Add a remote repository
- See all list branches
- See List branch
- Create a new branch
- Delete a branch
- Force delete a branch
- Move or rename a branch
- Check remote branches
- Switch to a newly created branch
- Create a branch and switch to it immediately
- Create and switch based on existing branch
- Commit changes in the editor
- Commit changes with a message
- Commit changes and skip the staging area
- Amend the most recent commit
- Check git configuration
- Setup git username
- Setup git email
- Cache login credentials
- Set automatic command line coloring for Git
- Ignore all file for all local repositories
- Create shortcut alias
- See commit history
- See commit history including changes
- See log stats
- See log commit include moved path
- See log commit in single line
- Check the current commits log of a remote repo in Git