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.
git commit -m "πππ₯π₯π¨ ππ‘ππ«π, πππ₯π₯π¨π° <ππππππππππ />!"
made with β€οΈ
[directory]
[repo]
[name]
[directory]
directory
for the next commit. Replace
directory
with a
file
to change a specific file.
"message"
message
as the commit message.
[base]
base
.
base
can be a commit ID, branch name, a tag, or a relative reference to HEAD.
[commit]
branch
rgument to create a new branch with the name
branch
.
[branch]
branch
.
Drop the -b flag to checkout an existing branch.
[branch-name]
[-a]
[name]
[url]
name
as a shortcut for url
in other
commands.
[remote]
[branch]
branch
, from the repo. Leave
off branch
to fetch all remote refs.
[branch-name]
[alias]
/[branch-name]
[commit]
commit
,
then apply it to the current branch.
[file]
file
from the staging area, but leave
the working directory unchanged. This unstages a file without overwriting any
changes.
[SHA]
[commit]
commit
,
reset the staging area to match, but leave the working directory alone.
[commit]
commit
.
[base]
nase
. Launches editor to enter commands for how
each commit will be transferred to
the new base.
[file]
[existing-path] [new-path]
.gitignore
with either direct string matches or wildcard globs.
[file]
With platform specific installers for Git, GitHub also provides the ease of staying up-to-date with the latest releases of the command line tool while providing a graphical user interface for day-to-day interaction, review, and repository synchronization.
If you want to use GitHub on your Mac, you can download the GitHub from Click here.
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.
Git is easy to learn and has a tiny footprint with lightning fast performance. It outclasses SCM tools like Subversion, CVS, Perforce, and ClearCase with features like cheap local branching, convenient staging areas, and multiple workflows.
For Linux and Solaris platforms, the latest release is available on the official Git web site.