The small devteam I'm on just recently went "cold turkey" on Visual SourceSafe and started using Git (Windows, Visual Studio 2008, etc. pretty vanilla stuff). We're using GitExtensions and so far 开发者_StackOverflowso good, we're really loving it!
We have a what we call a "shared repo" on one of our file servers where we push to and pull from in order to share code.
Now as the person primarily responsible for deploying code into production, I typically pull and deal with all the merging into my own repo. Then I deploy code to our Test environment and repeat until ready. Once it's ready to go to our production server, I label the final merge/commit in my repo, deploy the code, then push it back to the shared repo.
But when the others pull after that, they don't see my labels.
So, here I am: what's the trick? Any help would be greatly appreciated.
By default git push
does not push tags. You need to use the --tags
options
git push --tags
Note though that this pushes tags only.
You need to push the label (tag) to the remote repository before others will be able to recieve them.
In GitExtensions, in the push dialog, select the "tags" tab. Then select the tag you want to push or select "push all tags". Hit the push button and the tags will be pushed to the remote repository.
When others pull, they will recieve all tags that are in the remote repository.
You can push a tag using:
$ git push <remote name> <tag name>
If you want to push all tags, use
$ git push --tags
精彩评论