Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit fbb0264

Browse files
Update README.md
1 parent b29887f commit fbb0264

File tree

1 file changed

+89
-89
lines changed

1 file changed

+89
-89
lines changed

‎README.md

Lines changed: 89 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -100,150 +100,150 @@
100100

101101
10. ### Workspace synchronization from Repository (Workspace <-- Repository)
102102

103-
# merge the specified branch to the current branch.
104-
$ git merge [branch]
103+
# merge the specified branch to the current branch.
104+
$ git merge [branch]
105105

106-
# merge a branch into a target branch
107-
$ git merge [source branch] [target branch]
106+
# merge a branch into a target branch
107+
$ git merge [source branch] [target branch]
108108

109109
11. ### Workspace synchronization from remote (Workspace <-- Repository <-- Remote)
110110

111-
# Retrieve the changes to the Remote Repository and merge with the local branch (fetch+merge)
112-
$ git pull origin [branch]
111+
# Retrieve the changes to the Remote Repository and merge with the local branch (fetch+merge)
112+
$ git pull origin [branch]
113113

114114
12. ### View Information
115115

116-
# Display the changed files.
117-
$ git status
116+
# Display the changed files.
117+
$ git status
118118

119-
# Display the version history of the current branch.
120-
$ git log
119+
# Display the version history of the current branch.
120+
$ git log
121121

122-
# Display the commit history, and the changed files for each commit.
123-
$ git log --stat
122+
# Display the commit history, and the changed files for each commit.
123+
$ git log --stat
124124

125-
# Search commit history, according the keyword.
126-
$ git log -S [keyword]
125+
# Search commit history, according the keyword.
126+
$ git log -S [keyword]
127127

128-
# Display all changes since a certain commit, occupying one line for one commit.
129-
$ git log [tag] HEAD --pretty=format:%s
128+
# Display all changes since a certain commit, occupying one line for one commit.
129+
$ git log [tag] HEAD --pretty=format:%s
130130

131-
# Display all changes since a certain commit, and its "commit description" must meet the search criteria.
132-
$ git log [tag] HEAD --grep feature
131+
# Display all changes since a certain commit, and its "commit description" must meet the search criteria.
132+
$ git log [tag] HEAD --grep feature
133133

134-
# Display the version history of a certain file.
135-
$ git log --follow [file]
136-
$ git whatchanged [file]
134+
# Display the version history of a certain file.
135+
$ git log --follow [file]
136+
$ git whatchanged [file]
137137

138-
# Display each diff related to the specified file.
139-
$ git log -p [file]
138+
# Display each diff related to the specified file.
139+
$ git log -p [file]
140140

141-
# Display the past 5 commits.
142-
$ git log -5 --pretty --oneline
141+
# Display the past 5 commits.
142+
$ git log -5 --pretty --oneline
143143

144-
# Display all the users who have committed, sorted by number of commits.
145-
$ git shortlog -sn
144+
# Display all the users who have committed, sorted by number of commits.
145+
$ git shortlog -sn
146146

147-
# Display when and by whom the specified file was modified.
148-
$ git blame [file]
147+
# Display when and by whom the specified file was modified.
148+
$ git blame [file]
149149

150-
# Display the difference between the Index and the Workspace.
151-
$ git diff
150+
# Display the difference between the Index and the Workspace.
151+
$ git diff
152152

153-
# Display the difference between the Index and the previous commit.
154-
$ git diff --cached [file]
153+
# Display the difference between the Index and the previous commit.
154+
$ git diff --cached [file]
155155

156-
# Display the difference between the Workspace and the latest commit of the current branch.
157-
$ git diff HEAD
156+
# Display the difference between the Workspace and the latest commit of the current branch.
157+
$ git diff HEAD
158158

159-
# Display the difference between two commits.
160-
$ git diff [first-branch]...[second-branch]
159+
# Display the difference between two commits.
160+
$ git diff [first-branch]...[second-branch]
161161

162-
# Display how many lines of code you have written today.
163-
$ git diff --shortstat "@{0 day ago}"
162+
# Display how many lines of code you have written today.
163+
$ git diff --shortstat "@{0 day ago}"
164164

165-
# Show the metadata and the changed content for a certain commit.
166-
$ git show [commit]
165+
# Show the metadata and the changed content for a certain commit.
166+
$ git show [commit]
167167

168-
# Show the changed file for a certain commit.
169-
$ git show --name-only [commit]
168+
# Show the changed file for a certain commit.
169+
$ git show --name-only [commit]
170170

171-
# Show the contents of a certain file for a certain commit.
172-
$ git show [commit]:[filename]
171+
# Show the contents of a certain file for a certain commit.
172+
$ git show [commit]:[filename]
173173

174-
# Show the latest commits of the current branch.
175-
$ git reflog
174+
# Show the latest commits of the current branch.
175+
$ git reflog
176176

177177

178178

179179
12. ### Branching
180180

181-
# List all local branches. (the asterisk denotes the current branch)
182-
$ git branch
181+
# List all local branches. (the asterisk denotes the current branch)
182+
$ git branch
183183

184-
# List all remote branches.
185-
$ git branch -r
184+
# List all remote branches.
185+
$ git branch -r
186186

187-
# List all local branches and remote branches.
188-
$ git branch -a
187+
# List all local branches and remote branches.
188+
$ git branch -a
189189

190-
# Create a new branch, but still stay in the current branch.
191-
$ git branch [branch-name]
190+
# Create a new branch, but still stay in the current branch.
191+
$ git branch [branch-name]
192192

193-
# Create a new branch and switch to the branch.
194-
$ git checkout -b [branch]
193+
# Create a new branch and switch to the branch.
194+
$ git checkout -b [branch]
195195

196-
# Switch to the specified branch and update the workspace.
197-
$ git checkout [branch-name]
196+
# Switch to the specified branch and update the workspace.
197+
$ git checkout [branch-name]
198198

199-
# Switch to the previous branch.
200-
$ git checkout -
199+
# Switch to the previous branch.
200+
$ git checkout -
201201

202-
# Delete the branch.
203-
$ git branch -d [branch-name]
204-
205-
# Delete the remote branch.
206-
$ git push origin --delete [branch-name]
207-
$ git branch -dr [remote/branch]
202+
# Delete the branch.
203+
$ git branch -d [branch-name]
204+
205+
# Delete the remote branch.
206+
$ git push origin --delete [branch-name]
207+
$ git branch -dr [remote/branch]
208208

209209

210210
13. ### Ignore files and folder
211211

212-
# Delete the files in the Workspace and put this deletion into the Index.
213-
$ git rm [file1] [file2] ...
212+
# Delete the files in the Workspace and put this deletion into the Index.
213+
$ git rm [file1] [file2] ...
214214

215215

216-
# Stop tracking the specified file, but the file will be remained in the Workspace.
217-
$ git rm --cached [file]
216+
# Stop tracking the specified file, but the file will be remained in the Workspace.
217+
$ git rm --cached [file]
218218

219219
14. ### Tag
220220

221-
# List all tags.
222-
$ git tag
221+
# List all tags.
222+
$ git tag
223223

224-
# Create a new tag in the current commit.
225-
$ git tag [tag]
224+
# Create a new tag in the current commit.
225+
$ git tag [tag]
226226

227-
# Create a new tag in the specified commit.
228-
$ git tag [tag] [commit]
227+
# Create a new tag in the specified commit.
228+
$ git tag [tag] [commit]
229229

230-
# Delete the local tag.
231-
$ git tag -d [tag]
230+
# Delete the local tag.
231+
$ git tag -d [tag]
232232

233-
# Delete the remote tag.
234-
$ git push origin :refs/tags/[tagName]
233+
# Delete the remote tag.
234+
$ git push origin :refs/tags/[tagName]
235235

236-
# View the tag information.
237-
$ git show [tag]
236+
# View the tag information.
237+
$ git show [tag]
238238

239-
# Commit the specified tag.
240-
$ git push [remote] [tag]
239+
# Commit the specified tag.
240+
$ git push [remote] [tag]
241241

242-
# Commit all tags.
243-
$ git push [remote] --tags
242+
# Commit all tags.
243+
$ git push [remote] --tags
244244

245-
# Create a new branch pointing to a certain tag
246-
$ git checkout -b [branch] [tag]
245+
# Create a new branch pointing to a certain tag
246+
$ git checkout -b [branch] [tag]
247247

248248

249249

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /