0% found this document useful (0 votes)
11 views

Git Commands Cheatsheet

The document provides a cheat sheet for common Git commands including commands for initializing a local repository, tracking changes, staging files, committing changes, viewing history and switching/merging branches.

Uploaded by

Siri Study
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Git Commands Cheatsheet

The document provides a cheat sheet for common Git commands including commands for initializing a local repository, tracking changes, staging files, committing changes, viewing history and switching/merging branches.

Uploaded by

Siri Study
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Git Command Cheat Sheet

1 2 3 4 5

git init git diff git status git add git add <file>

Create new local Show changes not List new or Stage all changed
Stage a file.
repo. yet staged. unmodified files. files.

@iamgnanadeep
Git Command Cheat Sheet

6 7 8 9 10

git commit -- git checkout


git commit -a git commit git log
amend <branch>

Commit all local


Commit previously Change the last Show full change Switch a branch and
changes in tracked
staged changes. commit. history. update directory.
files.

@iamgnanadeep
Git Command Cheat Sheet

11 12 13 14 15

git pull git push


git checkout git checkout git fetch
<remote> <remote>
<new-branch> -d <branch> <remote>
<branch> <branch>

Fetch remote version Push the committed


Fetch all branches
Create new branch. Delete a branch. and update local changes to remote
from remote repo.
branch. repoistory.

@iamgnanadeep
Git Command Cheat Sheet

16 17 18

git merge git rebase git revert


<branch> <branch> <remote>

Merge the specified Rebase your current Creates a new


branch into the HEAD onto the commit to revert the
current branch. specified branch. specified commit .

@iamgnanadeep
FOLLOW
FOR MORE
@iamgnanadeep

You might also like