Skip to content

Commit

Permalink
Add an example of using tags
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisguest75 committed Jun 16, 2023
1 parent 2b7beee commit 472b6b6
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 6 deletions.
6 changes: 0 additions & 6 deletions 36_git/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,6 @@ git effort -- --since='yesterday'
git effort -- --since='1 month ago'
```

### Check tag format

```sh
git check-ref-format "tags/0.0.1-a39f8a821fc9"
```

## Resources

* [git-extras](https://github.com/tj/git-extras/blob/master/Commands.md) are a really good set of useful supplementary commands.
Expand Down
41 changes: 41 additions & 0 deletions 36_git/sections/TAGS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# TAGS

Demonstrate how to use tags with git.

## Clone repository

```sh
gh repo clone kubernetes/ingress-nginx
```

## Tags

```sh
# list tags
git tag

# sync to a tag
git checkout helm-chart-3.31.0
git checkout helm-chart-4.0.1
git checkout helm-chart-3.41.0
```

## Check tag format

The git check-ref-format command is used to ensure that a reference name (like a branch, tag, etc.) is well-formed.

```sh
git check-ref-format "tags/0.0.1-a39f8a821fc9"
```

## Diffing tags

```sh
# show files with diff in a specific folder
git diff --summary helm-chart-3.31.0..helm-chart-4.0.1 -- ./charts/

# diff files
git diff helm-chart-3.31.0..helm-chart-4.0.1 -- ./charts/
```

## Resources

0 comments on commit 472b6b6

Please sign in to comment.