michal.jakubeczy
michal.jakubeczy

Reputation: 9507

Git - commit and tag in a single command

I am doing a commit in a git in a following manner:

git commit -m "message"

And then I am adding a tag

git tag -a v1.2 9fceb02

Is it possible to do this in a single command?

Upvotes: 2

Views: 726

Answers (1)

Hainan Zhao
Hainan Zhao

Reputation: 2092

create a commitag.bat file, put it in one of the system PATH folder.

git commit -m %1  
git tag -a %2

runcommitag "message" v1.2

Upvotes: 3

Related Questions