@@ -13,17 +13,17 @@ http://mac.github.com
13
13
14
14
Git distributions for Linux and POSIX systems are available on the official Git SCM web site.
15
15
16
- ###Git for All Platforms
16
+ ###Git for all platforms
17
17
http://git-scm.com
18
18
19
19
## Configure tooling
20
20
Configure user information for all local repositories
21
21
22
22
``` git config --global user.name "[name]" ```
23
- Set your name that will be recorded for commit transactions
23
+ Set your name that will be recorded in commit transactions
24
24
25
25
``` git config --global user.email "[email address]" ```
26
- Set your email address that will be saved for commit transations
26
+ Set your email address that will be saved in commit transitions
27
27
28
28
``` git config --global color.ui auto ```
29
29
Enable helpful colorization of command line output
@@ -54,7 +54,7 @@ Snapshot the file in preparation for versioning
54
54
Show file differences between staging and the last file version
55
55
56
56
``` git reset [file] ```
57
- Remove the file from the staging area
57
+ Unstage the file, but preserve its contents
58
58
59
59
``` git commit -m"[descriptive message]" ```
60
60
Record file snapshots permanently in version history
@@ -63,16 +63,16 @@ Record file snapshots permanently in version history
63
63
Name a series of commits and combine completed efforts
64
64
65
65
``` git branch ```
66
- List all local branches to the current repository
66
+ List all local branches in the current repository
67
67
68
68
``` git branch [branch-name] ```
69
69
Create a new branch
70
70
71
71
``` git checkout [branch-name] ```
72
- Switch branches with respect to its specific commits
72
+ Switch to the specified branch and update working directory
73
73
74
74
``` git merge [branch-name] ```
75
- Combine the specified branch’s history into the current one
75
+ Combine the specified branch’s history into the current branch
76
76
77
77
``` git branch -d [branch-name] ```
78
78
Delete the specified branch
@@ -82,10 +82,10 @@ Delete the specified branch
82
82
Relocate and remove versioned files
83
83
84
84
``` git rm [file] ```
85
- Delete the file from the project prepare the removal for commit
85
+ Delete the file from the working directory and stage the deletion
86
86
87
87
``` git rm --cached [file] ```
88
- Remove the file from version control but keep in project directory
88
+ Remove from version control but preserve the file locally
89
89
90
90
``` git mv [file-original] [file-renamed] ```
91
91
Change the filename and prepare it for commit
@@ -98,49 +98,49 @@ Exclude temporary files and paths
98
98
build/
99
99
temp-*
100
100
```
101
- Create a _ .gitignore _ text file supress accidental versioning of files and paths matching the specified glob patterns
101
+ A text file named ` .gitignore ` suppresses accidental versioning of files and paths matching the specified patterns
102
102
103
103
``` git ls-files --other --ignored --exclude-standard ```
104
- List all ignore pattern matched files in project
104
+ List all ignored files in this project
105
105
106
106
## Save fragments
107
107
Shelve and restore incomplete changes
108
108
109
109
``` git stash ```
110
- Temporarily store all modified, tracked files
110
+ Temporarily store all modified tracked files
111
111
112
112
``` git stash pop ```
113
- Restore the most recent stashed files
113
+ Restore the most recently stashed files
114
114
115
115
``` git stash list ```
116
- List all shelved changes
116
+ List all stashed changesets
117
117
118
118
``` git stash drop ```
119
- Discard the most recent stashed files
119
+ Discard the most recently stashed changeset
120
120
121
121
## Review history
122
122
Browse and inspect the evolution of project files
123
123
124
124
``` git log ```
125
- List all version history for the current branch
125
+ List version history for the current branch
126
126
127
127
``` git log --follow [file] ```
128
- List version history for a file and possible renames
128
+ List version history for a file, including renames
129
129
130
130
``` git diff [first-branch]...[second-branch] ```
131
131
Show content differences between two branches
132
132
133
133
``` git show [commit] ```
134
- Output all details of the specified commit
134
+ Output metadata and content changes of the specified commit
135
135
136
136
## Redo commits
137
137
Erase mistakes and craft replacement history
138
138
139
139
``` git reset [commit] ```
140
- Undo all commits after commit while preserving changes
140
+ Undo all commits after [ commit] , preserving changes locally
141
141
142
142
``` git reset --hard [commit] ```
143
- Discard all history and changes back to specified commit
143
+ Discard all history and changes back to the specified commit
144
144
145
145
## Synchronize changes
146
146
Register a repository bookmark and exchange version history
@@ -155,7 +155,7 @@ Combine bookmark’s branch into into current local brancha
155
155
Upload all local branch commits to GitHub
156
156
157
157
``` git pull ```
158
- Sychronize bookmark history and current branch all at once
158
+ Sychronize bookmark history and incorporate current branch changes
159
159
160
160
---
161
161
0 commit comments