Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
56 views
2 pages
Git Cheat Sheet
Git commands
Uploaded by
Anuj Kundar
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save GitCheatSheet For Later
Download
Save
Save GitCheatSheet For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
56 views
2 pages
Git Cheat Sheet
Git commands
Uploaded by
Anuj Kundar
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save GitCheatSheet For Later
Carousel Previous
Carousel Next
Download
Save
Save GitCheatSheet For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 2
Search
Fullscreen
GitHub GIT CHEAT SHEET 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. INSTALLATION & GUIS \With platform specific installers fr Git, GitHub also provides the ease of staying up-to-date with the latest releases of the command line toot wale providing agraphical user interface for day-to-day. Interaction review, and repository synchronization GitHub for Windows hetps://windaws github,com GitHub for Mac https://mac githubcom For Linux and Solaris platforms, thelatest release is available on the oficial Git web sit. Git for AllPlatforms hetpy//git-semcam ‘SETUP Configuringuser information used across alllocal repositories git config --global username “[tirstname Lastname]” set a name that is identifiable for credit when review version history git config --global user-enail “[valid-enail]" set an email address that willbe associated with eachhistory marker git config --global color.ui auto set automatic command line colaring for it for easy reviewing, SETUP & INIT Configuring user information initializing and cloning repositories git inte initialize an existing directory asa Git repository git clone [ut] retrieve an entirerepasitory from ahostedlocation via URL STAGE & SNAPSHOT Working with snapshots and the Git staging area git status ‘show modified files in working director, staged for your next commit git ada [eite] ‘adda file ast looks now to your next commit (stage) git reset [¢ile] Unstage ale while retaining the changes in working directory git cite diff of whats changedbut not staged git dite --staged iff of what is staged but nat yet committed git comit -m “[descriptive message] commit your staged content as anew cammit snapshot BRANCH & MERGE Isolating work inbranches, changing context, and integrating changes ‘git branch listyourbranches.a*willappear next to the currently active ranch ‘git branch [branch-nane] create anewbranch at the current commit ‘git checkout ‘switch to another branch and check it out into your working directory ‘git merge [branch] merge the specified branchshistory into the current ane ‘tt Log showall commits nthe currantbranch’s historyoO INSPECT & COMPARE Examining logs, diffs and object information ait log show the commit history or the currently active branch ft Log brancha. .branena show the commits on brancha that are not on branchB git log --foltow [este] show the commits that changed file, even across renames git Aise branch®....brancha show the dif of what isin branchA that snot inbranch® git show [SHA] show any objectin Git inbuman-readable format TRACKING PATH CHANGES: ‘Versioning fileremoves and path changes git am [file] delete the file from project and stage the removal for commit git av [existing-path] [new-path] change an existing le path and stage the move git tog --stat -M show all commit logs with indication of any paths that moved IGNORING PATTERNS Preventing unintentional staging or commiting of files Logs/, scnotes patternt/ Save file with desired patterns as gitigrore with elther direct string, matches or wildcard giobs. git config --global core.excludestite [£ite] system wide ignore pattern for alllocal repositories GitHub Education Teach nd learn better, together. GitHub free for students and teach- ers, Discounts available for other educational uses. ‘SHARE & UPDATE Retrieving updates from anather repository and updatinglocal repos git remote add [alias] Curt] ‘add agit URL as analias git teten [alias] fetch downall the branches from that Git remote git merge [alias]/[oranch] ‘merge aremote branch into your current branch tobring t upto date git push [alias] [branch] “Tansmit local branch commits to the remote repository branch git pull fetch and merge any commits from the tracking remote branch REWRITE HISTORY Revaiting branches, updating commits and clearing history git xebase [branch] apply any commits of current branch ahead of specified ane git reset --hard [commit] clear staging area, rewrite working tree from specified commit ‘TEMPORARY COMMITS Temporarily store madified, tracked files inorder to change branches, git stash Save modified and staged changes Git stash List Uststack-order of stashed le changes att stash pop write working rom top af stash stack ait stash dzop discard the changes from top of stash stack 22
[email protected]
‘© education github.com
You might also like
Git-Cheat-Sheet-Education - Git-Cheat-Sheet-Education
PDF
No ratings yet
Git-Cheat-Sheet-Education - Git-Cheat-Sheet-Education
2 pages
Git Cheat Sheet
PDF
No ratings yet
Git Cheat Sheet
7 pages
Git Cheat Sheet Education
PDF
No ratings yet
Git Cheat Sheet Education
2 pages
Git Cheat Sheet Education Git Cheat Sheet Education
PDF
No ratings yet
Git Cheat Sheet Education Git Cheat Sheet Education
2 pages
Git Cheat Sheet Education
PDF
No ratings yet
Git Cheat Sheet Education
3 pages
Git Cheat Sheet: Stage & Snapshot Installation & Guis
PDF
No ratings yet
Git Cheat Sheet: Stage & Snapshot Installation & Guis
2 pages
Git Cheat Sheet: Stage & Snapshot Installation & Guis
PDF
No ratings yet
Git Cheat Sheet: Stage & Snapshot Installation & Guis
2 pages
Git Cheat Sheet Education PDF
PDF
No ratings yet
Git Cheat Sheet Education PDF
2 pages
Git Cheat Sheet Education
PDF
50% (2)
Git Cheat Sheet Education
2 pages
Git and Github Commands 1719287860
PDF
No ratings yet
Git and Github Commands 1719287860
4 pages
Github Cheatsheet
PDF
No ratings yet
Github Cheatsheet
6 pages
Git Cheat Sheet: by Thesyntacticsugar
PDF
No ratings yet
Git Cheat Sheet: by Thesyntacticsugar
4 pages
Git Cheat Sheet
PDF
No ratings yet
Git Cheat Sheet
8 pages
GITHUB
PDF
No ratings yet
GITHUB
38 pages
Git & GitHub Cheat Sheet
PDF
No ratings yet
Git & GitHub Cheat Sheet
11 pages
GIT Cheatsheet
PDF
No ratings yet
GIT Cheatsheet
21 pages
GIT Cheat Sheet - : by Ganesh Kumar
PDF
No ratings yet
GIT Cheat Sheet - : by Ganesh Kumar
3 pages
Beginners Python Cheat Sheet Pcc Git
PDF
No ratings yet
Beginners Python Cheat Sheet Pcc Git
2 pages
GIT Cheat Sheet: $ Git Branch $ Git Logs
PDF
No ratings yet
GIT Cheat Sheet: $ Git Branch $ Git Logs
10 pages
?git Cheat Sheet
PDF
No ratings yet
?git Cheat Sheet
2 pages
Git Cheat Sheet
PDF
No ratings yet
Git Cheat Sheet
11 pages
Git Cheat Sheet - CIRA Software Engineering Group
PDF
No ratings yet
Git Cheat Sheet - CIRA Software Engineering Group
2 pages
Git and Github Datasheet
PDF
100% (1)
Git and Github Datasheet
14 pages
Git Cheat Sheet: Make Changes
PDF
No ratings yet
Git Cheat Sheet: Make Changes
3 pages
GIT AND GITHUB
PDF
No ratings yet
GIT AND GITHUB
21 pages
Git Cheatsheet PDF
PDF
100% (1)
Git Cheatsheet PDF
2 pages
Git Cheatsheet r2v1 PDF
PDF
No ratings yet
Git Cheatsheet r2v1 PDF
6 pages
GIT Cheat Sheet: $ Git Branch $ Git Logs
PDF
100% (1)
GIT Cheat Sheet: $ Git Branch $ Git Logs
10 pages
Git&Github
PDF
No ratings yet
Git&Github
5 pages
Beginners Python Cheat Sheet PCC Git BW
PDF
No ratings yet
Beginners Python Cheat Sheet PCC Git BW
2 pages
[Git Notes] - TheTestingAcademy (Pramod Sir) (1)
PDF
No ratings yet
[Git Notes] - TheTestingAcademy (Pramod Sir) (1)
21 pages
Comandos Git
PDF
No ratings yet
Comandos Git
13 pages
git-cheatsheet
PDF
No ratings yet
git-cheatsheet
6 pages
Git Commands _ DataCamp
PDF
No ratings yet
Git Commands _ DataCamp
21 pages
Git Command Cheat Sheet & Quick Reference
PDF
No ratings yet
Git Command Cheat Sheet & Quick Reference
11 pages
Unit 3 - Staging and Commits
PDF
No ratings yet
Unit 3 - Staging and Commits
4 pages
Git and Git Hub
PDF
No ratings yet
Git and Git Hub
2 pages
Github Git Cheat Sheet
PDF
No ratings yet
Github Git Cheat Sheet
2 pages
Git and Github Cheat Sheet
PDF
No ratings yet
Git and Github Cheat Sheet
2 pages
Git Hub PDF Cheat Sheet
PDF
100% (1)
Git Hub PDF Cheat Sheet
2 pages
Git and Github
PDF
No ratings yet
Git and Github
7 pages
GIT- Basic Commands
PDF
No ratings yet
GIT- Basic Commands
4 pages
CSE 390 "Lecture 11": Version Control With Git
PDF
No ratings yet
CSE 390 "Lecture 11": Version Control With Git
23 pages
Git Cheatsheet
PDF
No ratings yet
Git Cheatsheet
1 page
Git
PDF
No ratings yet
Git
4 pages
Git & Github Cheatsheet: Creating Repo
PDF
No ratings yet
Git & Github Cheatsheet: Creating Repo
4 pages
Github Git Cheat Sheet
PDF
No ratings yet
Github Git Cheat Sheet
2 pages
Skill Up Sept - Flutter
PDF
No ratings yet
Skill Up Sept - Flutter
2 pages
Report On One Day Workshop "App Development Using Flutter"
PDF
No ratings yet
Report On One Day Workshop "App Development Using Flutter"
4 pages
Reading Input by Creating An Object of Scanner Class:: Experiment No. 1
PDF
No ratings yet
Reading Input by Creating An Object of Scanner Class:: Experiment No. 1
5 pages
Experiment No. 2 Aim:: Problem Statement
PDF
No ratings yet
Experiment No. 2 Aim:: Problem Statement
3 pages