SourceTree Version 2.0.3 (2.0.3), OSX
Tag is created locally and pushed to remote.
$git ls-remote --tags 7232f4d05d4cb0a5d58da6e8b6f8ad5091b76510 refs/tags/MY_TAG
Then try to add the same tag with options Push to [remote] and Move existing tag I get error
I try to move MY_TAG from 7232f4d to c633bae.
git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree tag -f MY_TAG c633baec0e902b757ca1e6c11e03d582c8eac43b Updated tag 'MY_TAG' (was 7232f4d) git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree push -v dropbox refs/tags/MY_TAG Pushing to some.git To some.git ! [rejected] MY_TAG -> MY_TAG (already exists) error: failed to push some refs to 'some.git' hint: Updates were rejected because the tag already exists in the remote. Completed with errors, see above
Check tags:
$git show-ref --tags c633baec0e902b757ca1e6c11e03d582c8eac43b refs/tags/MY_TAG $git ls-remote --tags 7232f4d05d4cb0a5d58da6e8b6f8ad5091b76510 refs/tags/MY_TAG
Yes, it's obvious how to track deployed version at the server, tag or just hash, but is there a way to track it by git too. So one open SourceTree and see the commit deployed. Also we can write some script to download and show version.txt from every server, it's really simple, but the question is about git. Thank you, Seth, for the answer
Our company has a deployment script that takes a selected tag, exports the files at that tag, then writes the tag name to a web-accessible version.txt file. So our tags are version-numbers (not moveable), and you can find what code is deployed on a server by visiting the version.txt file on that server. Note that version.txt is NOT a file that is tracked by Git.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok, let's say we use tags to mark deployed commit to particular server, how to mark it not using tags?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Be hesitant to move tags. Even if pushing the moved tag had worked as desired, doing so will cause problems for anyone else who has pulled that tag down to their machine. When moving a tag is necessary, make sure to inform other team members so they can delete their local copy of the tag.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.