@@ -76,7 +76,7 @@ These are called Branching Strategies, but are just as easily called *Team Colla
76
76
* Maintaining ` author ` and ` committer ` fields
77
77
* Tracing any cherry-picks with ` -x ` commit message metadata
78
78
* ` -x ` metadata hyperlinked on GitHub
79
- * ` git cherry ` to view absent commits
79
+ * ` $ git cherry` to view absent commits
80
80
* Rebase interactive
81
81
* Can include cherry-pick
82
82
* Must remember to continue the rebase
@@ -164,26 +164,26 @@ $ git config --global alias.s 'status -s'
164
164
* Tag with message (defaults to annotated)
165
165
* Force existing tag to new ref
166
166
* Delete a tag
167
- * ` git describe ` to name the most recent reachable tag
167
+ * ` $ git describe` to name the most recent reachable tag
168
168
* Tag types (reference, annotated, signed)
169
169
* Deleting a tag locally
170
170
* Deleting tag on a remote
171
171
172
172
#### Details
173
173
```
174
- git tag
175
- git tag -a
176
- git tag -a -m
174
+ $ git tag
175
+ $ git tag -a
176
+ $ git tag -a -m
177
177
178
- git tag -m<message> <TAGNAME>
179
- git tag -a -m<message> <TAGNAME>
180
- git tag -s -m<message> <TAGNAME>
181
- git tag -f <TAGNAME>
182
- git tag -d <TAGNAME>
183
- git describe
184
- git describe <SHA>
185
- git tag -d 12345
186
- git push origin :<tag-name-to-delete>
178
+ $ git tag -m<message> <TAGNAME>
179
+ $ git tag -a -m<message> <TAGNAME>
180
+ $ git tag -s -m<message> <TAGNAME>
181
+ $ git tag -f <TAGNAME>
182
+ $ git tag -d <TAGNAME>
183
+ $ git describe
184
+ $ git describe <SHA>
185
+ $ git tag -d 12345
186
+ $ git push origin :<tag-name-to-delete>
187
187
```
188
188
189
189
@@ -592,8 +592,8 @@ $ git config rerere.enable true
592
592
* Ability to retrieve Pull Request branches
593
593
594
594
```
595
- git fetch [repo-url] [source]:[destination]
596
- git config --add remote.[upstream].fetch "" +refs/pull/*/head:refs/remotes/[upstream]/pull/*" "
595
+ $ git fetch [repo-url] [source]:[destination]
596
+ $ git config --add remote.[upstream].fetch "+refs/pull/*/head:refs/remotes/[upstream]/pull/*"
597
597
```
598
598
599
599
## Git Notes
@@ -607,16 +607,16 @@ git config --add remote.[upstream].fetch ""+refs/pull/*/head:refs/remotes/[upstr
607
607
* Manual retrieval
608
608
609
609
```
610
- git notes add [commit]
611
- git notes edit [commit]
610
+ $ git notes add [commit]
611
+ $ git notes edit [commit]
612
612
613
- git notes --ref=[namespace] add [commit]
614
- git log --show-notes=[namespace]
613
+ $ git notes --ref=[namespace] add [commit]
614
+ $ git log --show-notes=[namespace]
615
615
616
- git push [remote] refs/notes/*
617
- git push [remote] refs/notes/[namespace]
616
+ $ git push [remote] refs/notes/*
617
+ $ git push [remote] refs/notes/[namespace]
618
618
619
- git fetch [remote] refs/notes/*:refs/notes/*
619
+ $ git fetch [remote] refs/notes/*:refs/notes/*
620
620
621
621
```
622
622
0 commit comments