Skip to content

Instantly share code, notes, and snippets.

View MedUnes's full-sized avatar
💭
I may be slow to respond.

medunes MedUnes

💭
I may be slow to respond.
View GitHub Profile
@MedUnes
MedUnes / last_tag.sh
Last active June 12, 2022 20:47
[Bash] Get the n(th) git tag
#!/bin/bash
n=$1
git for-each-ref --sort=-taggerdate | grep refs/tags/v | cut -d '/' -f 3 | head -$n | tail -1