Kixoka
Kixoka

Reputation: 1161

what are proper steps for adding git tag to a commit in bash?

I need to start adding a tag to my commits... I use bash shell. what is the proper sequence

I did it like this:

git tag <verbiage>
git commit <verbiage>

Is this correct?

Upvotes: 1

Views: 81

Answers (1)

Mureinik
Mureinik

Reputation: 311853

You'd usually create a tag to point to a commit after you created it:

# Do some work

# Stage the files
git add relevant_file_1.txt relevant_file_2.txt

# Commit it
git commit -m "Version 1 ready"

# tag that commit
git tag version_1

Upvotes: 1

Related Questions