You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: guides/cs107e-git.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -143,6 +143,21 @@ was successful by browsing your repo on GitHub and
143
143
confirming that your newly created tag shows up in the __Tags__ section of the branches
144
144
dropdown menu.
145
145
146
+
#### Adding a tag to a speicfic commit
147
+
If you say mispelled a tag, forgot to tag, or otherwise need to go back and add a tag to an older commit here is how.
148
+
149
+
First you will need to find the commit hash of the tag you want. The commit hash is the really long sequence of letters and numbers next to each commit.
150
+
Note you only need to copy the first seven or eight characters of the hash. To see a list of all your commits and their associated hashes run:
151
+
```console
152
+
$ git log
153
+
```
154
+
155
+
From there to add a tag to this commit you can run:
156
+
```console
157
+
$ git tag assignX-submit [paste hash here and remove brackets]
158
+
$ git push --tags
159
+
```
160
+
146
161
<Aname="resubmit"></a>
147
162
#### Move tag for resubmit
148
163
If you need to update your previously tagged submission with additional changes, you can move the tag to a different commit with the following command
0 commit comments