adam.hendry
adam.hendry

Reputation: 5673

Tagging Git with Project Name

When tagging in Git, should I also add the project name? For instance, should I use

git tag project-v1.0.0

or just

git tag v1.0.0?

I ask because when someone clones my project, I want it to be cloned into a folder with the project name.

Upvotes: 0

Views: 46

Answers (2)

Robert Pawlak
Robert Pawlak

Reputation: 529

As far as i know this is not possible at git basis. If project name is also name of top project directory (what is common aproach), then You could try cut command:

git rev-parse --show-toplevel

Which gives you full path of working directory. Then just make a git hook, with sth similar:

$(git rev-parse --show-toplevel)-v1.1.0

Upvotes: 0

F.Guerinoni
F.Guerinoni

Reputation: 277

Keep tag simple, 1.0.0 is enough! The folder of clone doesn't depend from tags name.

Upvotes: 1

Related Questions