github - Checkout a git repo and keep updated with only the latest tag -


is there way keep checkout updated between tags, , tags?

ideally, want go checkout's directory, type "git pull", have command fail if there no new tags in repo or pull code down newer tag.

is bad idea? maybe, because can't find solution, no 1 this. there issues executing way?

you use following script:

git fetch origin currenttag=$(git describe --tags --abbrev=0) lasttag=$(git describe --tags --abbrev=0 origin/master) if [ $currenttag != $lasttag ];   git checkout $lasttag;   exit 0 else   exit 1 fi 

Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -