1

I have a question.

Now in project we use git for automatically update testing server (deployment). There is fresh HEAD revision on hook when push to repository using Jenkins.

Now there is an Idea about using moving tags to point on deploy revision. Example git tag for-deploy, and move this tag to needed revision. By idea server should deploy revision marker for-deploy on each moving this tag using hook.

What are you think about it?

4

1 回答 1

2

Tags generally shouldn't change as they are intended to mark a specific commit. Instead, what you are describing is exactly what a branch is intended for. You can create a new deployment branch where you can merge commits to whenever you are ready for deployment. Then you just need to deploy the HEAD of that branch using something like

git pull origin deployment
于 2012-06-19T17:22:24.453 回答