@@ -20,78 +20,78 @@ http://git-scm.com
2020Configure user information for all local repositories
2121
2222``` $ git config --global user.name "[name]" ```
23- Set the name you want attached to your commit transactions
23+ Sets the name you want attached to your commit transactions
2424
2525``` $ git config --global user.email "[email address]" ```
26- Set the email you want attached to your commit transactions
26+ Sets the email you want attached to your commit transactions
2727
2828``` $ git config --global color.ui auto ```
29- Enable helpful colorization of command line output
29+ Enables helpful colorization of command line output
3030
3131
3232## Create repositories
33- Start a new repository or obtain one from an existing URL
33+ Starts a new repository or obtain one from an existing URL
3434
3535``` $ git init [project-name] ```
36- Create a new local repository with the specified name
36+ Creates a new local repository with the specified name
3737
3838``` $ git clone [url] ```
39- Download a project and its entire version history
39+ Downloads a project and its entire version history
4040
4141## Make changes
42- Review edits and craft a commit transaction
42+ Reviews edits and craft a commit transaction
4343
4444``` $ git status ```
45- List all new or modified files to be committed
45+ Lists all new or modified files to be committed
4646
4747``` $ git diff ```
48- Show file differences not yet staged
48+ Shows file differences not yet staged
4949
5050``` $ git add [file] ```
51- Snapshot the file in preparation for versioning
51+ Snapshots the file in preparation for versioning
5252
5353``` $ git diff --staged ```
54- Show file differences between staging and the last file version
54+ Shows file differences between staging and the last file version
5555
5656``` $ git reset [file] ```
57- Unstage the file, but preserve its contents
57+ Unstages the file, but preserve its contents
5858
5959``` $ git commit -m"[descriptive message]" ```
60- Record file snapshots permanently in version history
60+ Records file snapshots permanently in version history
6161
6262## Group changes
63- Name a series of commits and combine completed efforts
63+ Names a series of commits and combine completed efforts
6464
6565``` $ git branch ```
66- List all local branches in the current repository
66+ Lists all local branches in the current repository
6767
6868``` $ git branch [branch-name] ```
69- Create a new branch
69+ Creates a new branch
7070
7171``` $ git checkout [branch-name] ```
72- Switch to the specified branch and update working directory
72+ Switches to the specified branch and update working directory
7373
7474``` $ git merge [branch-name] ```
75- Combine the specified branch’s history into the current branch
75+ Combines the specified branch’s history into the current branch
7676
7777``` $ git branch -d [branch-name] ```
78- Delete the specified branch
78+ Deletes the specified branch
7979
8080
8181## Refactor filenames
82- Relocate and remove versioned files
82+ Relocates and remove versioned files
8383
8484``` $ git rm [file] ```
85- Delete the file from the working directory and stage the deletion
85+ Deletes the file from the working directory and stage the deletion
8686
8787``` $ git rm --cached [file] ```
88- Remove from version control but preserve the file locally
88+ Removes from version control but preserve the file locally
8989
9090``` $ git mv [file-original] [file-renamed] ```
91- Change the filename and prepare it for commit
91+ Changes the filename and prepare it for commit
9292
9393## Supress tracking
94- Exclude temporary files and paths
94+ Excludes temporary files and paths
9595
9696```
9797*.log
@@ -101,61 +101,61 @@ temp-*
101101A text file named ` .gitignore ` suppresses accidental versioning of files and paths matching the specified patterns
102102
103103``` $ git ls-files --other --ignored --exclude-standard ```
104- List all ignored files in this project
104+ Lists all ignored files in this project
105105
106106## Save fragments
107107Shelve and restore incomplete changes
108108
109109``` $ git stash ```
110- Temporarily store all modified tracked files
110+ Temporarily stores all modified tracked files
111111
112112``` $ git stash pop ```
113- Restore the most recently stashed files
113+ Restores the most recently stashed files
114114
115115``` $ git stash list ```
116- List all stashed changesets
116+ Lists all stashed changesets
117117
118118``` $ git stash drop ```
119- Discard the most recently stashed changeset
119+ Discards the most recently stashed changeset
120120
121121## Review history
122- Browse and inspect the evolution of project files
122+ Browses and inspect the evolution of project files
123123
124124``` $ git log ```
125- List version history for the current branch
125+ Lists version history for the current branch
126126
127127``` $ git log --follow [file] ```
128- List version history for a file, including renames
128+ Lists version history for a file, including renames
129129
130130``` $ git diff [first-branch]...[second-branch] ```
131- Show content differences between two branches
131+ Shows content differences between two branches
132132
133133``` $ git show [commit] ```
134- Output metadata and content changes of the specified commit
134+ Outputs metadata and content changes of the specified commit
135135
136136## Redo commits
137- Erase mistakes and craft replacement history
137+ Erases mistakes and craft replacement history
138138
139139``` $ git reset [commit] ```
140- Undo all commits after [ commit] , preserving changes locally
140+ Undoes all commits after [ commit] , preserving changes locally
141141
142142``` $ git reset --hard [commit] ```
143- Discard all history and changes back to the specified commit
143+ Discards all history and changes back to the specified commit
144144
145145## Synchronize changes
146- Register a repository bookmark and exchange version history
146+ Registers a repository bookmark and exchange version history
147147
148148``` $ git fetch [bookmark] ```
149- Download all history from the repository bookmark
149+ Downloads all history from the repository bookmark
150150
151151``` $ git merge [bookmark]/[branch] ```
152- Combine bookmark’s branch into into current local branch
152+ Combines bookmark’s branch into into current local branch
153153
154154``` $ git push [alias] [branch] ```
155- Upload all local branch commits to GitHub
155+ Uploads all local branch commits to GitHub
156156
157157``` $ git pull ```
158- Synchronize bookmark history and incorporate current branch changes
158+ Synchronizes bookmark history and incorporate current branch changes
159159
160160---
161161
0 commit comments