Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

something like same "tag" for multiple commits

Tags:

git

My dilemma: I always want to mark the last reviewed commit so that I can always specify the diff. I let my code to be reviewed only after certain time. How can I remember the last time I had my code reviewed?

My idea was to always tag: "reviewed" the last reviewed commit. However I'd prefer to have the opportunity to tag commits with this as-I-go. Without the need to always delete the tag. +I'd like to remember which diffs I had for reviewing.

So it would be the best if I could tag multiple commits with the same "tag". Unfortunatelly tag is something like an "ID" in DOM. I'd prefer something like "class" in DOM. Is there something like that?

like image 844
Novellizator Avatar asked Mar 26 '26 01:03

Novellizator


2 Answers

You might want to check git notes.

like image 123
kostix Avatar answered Mar 27 '26 13:03

kostix


You can generate a tag based on the current date/time:

$ git tag review-$(date +"%Y-%m-%d_%H-%M-%S")

This generates a tag like this:

$ git tag -l
review-2015-04-30_17-20-03

You can also define this as a git alias:

$ git config alias.tag-review '!git tag review-$(date +"%Y-%m-%d_%H-%M-%S")'

Now use

$ git tag-review
like image 34
StephenKing Avatar answered Mar 27 '26 15:03

StephenKing



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!