GIT CHEAT SHEET

Git  is  the  open  source  distributed  version  control  system  that  facilitates  GitHub  activities  on  your  laptop  or desktop. This cheat sheet summarizes commonly used Git command line instructions for quick reference.
INSTALL GIT
GitHub   provides   desktop   clients   that   include   a   graphical   user
interface  for  the  most  common  repository  actions  and  an  automati-cally updating command line edition of Git for advanced  scenarios.
GitHub for Windows

GitHub for Mac

Git  distributions  for  Linux  and  POSIX  systems  are  available  on  the official Git SCM web site.
Git for All Platforms

 

CONFIGURE TOOLING
Configure user information for all local repositories

Sets the name you want attached to your commit transactions

Sets the email you want attached to your commit transactions

Enables helpful colorization of command line output
CREATE REPOSITORIES
Start a new repository or obtain one from an existing URL

Creates a new local repository with the specified name

Downloads a project and its entire version history

MAKE CHANGES
Review edits and craft a commit transaction

Lists all new or modified files to be committed

Snapshots the file in preparation for versioning

Unstages the file, but preserve its contents

Shows file differences not yet staged

Shows file differences between staging and the last file version

Records file snapshots permanently in version history

GROUP CHANGES
Name a series of commits and combine completed efforts

Lists all local branches in the current repository

Creates a new branch

Switches to the specified branch and updates the working directory

Combines the specified branch’s history into the current branch

Deletes the specified branch

REFACTOR FILENAMES
Relocate and remove versioned files

Deletes the file from the working directory and stages the deletion

Removes the file from version control but preserves the file locally

Changes the file name and prepares it for commit

SUPPRESS TRACKING
Exclude temporary files and paths

 

 

Lists all ignored files in this project

SAVE FRAGMENTS
Shelve and restore incomplete changes

Temporarily stores all modified tracked files

Lists all stashed changesets

Restores the most recently stashed files

Discards the most recently stashed changeset

REVIEW HISTORY
Browse and inspect the evolution of project files

Lists version history for the current branch

Lists version history for a file, including renames

Shows content differences between two branches

Outputs metadata and content changes of the specified commit

REDO COMMITS
Erase mistakes and craft replacement history

Undoes all commits after [commit], preserving changes locally

Discards all history and changes back to the specified commit

YNCHRONIZE CHANGES
Register a repository bookmark and exchange version history

Downloads all history from the repository bookmark

Combines bookmark’s branch into current local branch

Uploads all local branch commits to GitHub

Downloads bookmark history and incorporates changes

Share This:

1 Comment

  1. Mark B | | Reply

    thanks .Really its very helpful.

Leave a Reply

Your email address will not be published. Required fields are marked *