Example: quiz answers

GIT CHEAT SHEET - GitHub Education

GIT CHEAT SHEETSTAGE & SNAPSHOTW orking with snapshots and the Git staging areagit statusshow modified files in working directory, staged for your next commitgit add [file]add a file as it looks now to your next commit (stage)git reset [file]unstage a file while retaining the changes in working directorygit diffdiff of what is changed but not stagedgit diff --stageddiff of what is staged but not yet committedgit commit -m [descriptive message] commit your staged content as a new commit snapshotSETUPC onfiguring user information used across all local repositoriesgit config --global [firstname lastname] set a name that is identifiable for credit when review version historygit config --global [valid-email]

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 for Git, GitHub also provides the

Tags:

  Open

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of GIT CHEAT SHEET - GitHub Education

1 GIT CHEAT SHEETSTAGE & SNAPSHOTW orking with snapshots and the Git staging areagit statusshow modified files in working directory, staged for your next commitgit add [file]add a file as it looks now to your next commit (stage)git reset [file]unstage a file while retaining the changes in working directorygit diffdiff of what is changed but not stagedgit diff --stageddiff of what is staged but not yet committedgit commit -m [descriptive message] commit your staged content as a new commit snapshotSETUPC onfiguring user information used across all local repositoriesgit config --global [firstname lastname] set a name that is identifiable for credit when review version historygit config --global [valid-email]

2 Set an email address that will be associated with each history markergit config --global autoset automatic command line coloring for Git for easy reviewingSETUP & INITC onfiguring user information, initializing and cloning repositoriesgit initinitialize an existing directory as a Git repositorygit clone [url]retrieve an entire repository from a hosted location via URLBRANCH & MERGEI solating work in branches, changing context, and integrating changesgit branchlist your branches. a * will appear next to the currently active branchgit branch [branch-name]create a new branch at the current commitgit checkoutswitch to another branch and check it out into your working directorygit merge [branch]merge the specified branch s history into the current onegit logshow all commits in the current branch s historyGit is the free and open source distributed version control system that's responsible for everything GitHub related that happens locally on your computer.

3 This CHEAT SHEET features the most important and commonly used Git commands for easy & GUISWith 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 for for Linux and Solaris platforms, the latest release is available on the official Git web for All and learn better, together. GitHub is free for students and teach-ers. Discounts available for other educational and learn better, together. GitHub is free for students and teach-ers.

4 Discounts available for other educational & UPDATER etrieving updates from another repository and updating local reposgit remote add [alias] [url]add a git URL as an aliasgit fetch [alias]fetch down all the branches from that Git remotegit merge [alias]/[branch]merge a remote branch into your current branch to bring it up to dategit push [alias] [branch]Transmit local branch commits to the remote repository branchgit pullfetch and merge any commits from the tracking remote branchTRACKING PATH CHANGESV ersioning file removes and path changesgit rm [file]delete the file from project and stage the removal for commitgit mv [existing-path] [new-path]change an existing file path and stage the movegit log --stat -Mshow all commit logs with indication of any paths that movedTEMPORARY COMMITST emporarily store modified, tracked files in order to change branchesgit stashSave modified and staged changesgit stash listlist stack-order of stashed file changesgit stash popwrite working from top of stash stackgit stash dropdiscard the changes from top of stash stackREWRITE HISTORYR ewriting branches, updating commits and clearing historygit rebase [branch]

5 Apply any commits of current branch ahead of specified onegit reset --hard [commit]clear staging area, rewrite working tree from specified commitINSPECT & COMPAREE xamining logs, diffs and object informationgit logshow the commit history for the currently active branchgit log the commits on branchA that are not on branchBgit log --follow [file]show the commits that changed file, even across renamesgit diff the diff of what is in branchA that is not in branchBgit show [SHA]show any object in Git in human-readable formatIGNORING PATTERNSP reventing unintentional staging or commiting of filesgit config --global [file]system wide ignore pattern for all local repositorieslogs/*.

6 Notespattern*/Save a file with desired patterns as .gitignore with either direct string matches or wildcard globs.


Related search queries