Home Git Cheat Sheet
Post
Cancel

Git Cheat Sheet

What is Git ?

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

Installing git

1
2
3
4
5
6
sudo apt install git      [ Debian/Ubuntu ]
sudo yum install git      [ RedHat/CentOS ]
sudo pacman -S git        [ Arch/Manjaro ]
sudo dnf install git      [ Fedora ]
sudo zypper install git   [ OpenSUSE ]
sudo brew install git     [ MacOS ]

Configuring username, email, editor

1
$ git config --global user.name "Priyanshu Tiwari"
1
$ git config --global user.email "ahampriyanshu@gmail.com"

Intializing local git repo

Creating upstream to the remote repo

Cloning remote repo

Working with branches

Commiting changes

Pushing changes

Fixing conflicts

Merging and deleting branch

Undoing bad commits

Rewriting commit history

What is Github

GitHub, Inc. is a provider of Internet hosting for software development and version control using Git owned by Microsoft.

Adding ssh key

Adding gpg key

This post is licensed under CC BY 4.0 by the author.

Generating sitemap with custom priority in Jekyll site

Installing MathJax & Latex Cheat Sheet