Skip to content

Commit 0195b9b

Browse files
committed
Tips on manually fixing version tagging errors
1 parent ab27a91 commit 0195b9b

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

README_Development.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,46 @@ git tag -a "v${CurrentVersion}" -m "Released version ${CurrentVersion}"
187187
git push origin "v${CurrentVersion}"
188188
~~~
189189

190+
**Manually Handling Tags**:
191+
192+
It may happen that come commits were wrongly tagged by version tags. In such cases, manual interventions with checking, deleting or re-aplying correct tags may be necessary. Here are some basic tips.
193+
194+
Showing tags:
195+
196+
~~~powershell
197+
# list local tags:
198+
git tag
199+
# list tags on the specified remote (origin in this case):
200+
git ls-remote --tags origin
201+
# List both local tags and tags from certain remote (origin):
202+
git fetch --tags
203+
git tag
204+
git ls-remote --tags
205+
# or:
206+
git fetch --tags
207+
git tag -l
208+
~~~
209+
210+
Removing tags:
211+
212+
~~~powershell
213+
# Remove the tag ("v1.2.3" in this case) only locally:
214+
git tag -d v1.2.3
215+
# Remove the tag on the remote called origin:
216+
git push origin --delete tag v1.2.3
217+
~~~
218+
219+
After cleanup, adding the correct tag:
220+
221+
~~~powershell
222+
git checkout main # or whatever branch needs to be tagged
223+
git pull # if necessary to get sync changes
224+
git tag -a v1.2.3 -m "Version 1.2.3"
225+
git push origin v1.2.3
226+
~~~
227+
228+
229+
190230
**Example Workflow**:
191231

192232
* tag the last verison on the `main` branch

0 commit comments

Comments
 (0)