[英]Tagging a previous git commit on remote and branching local version
Here's the situation: 情况如下:
How might I go about doing this? 我该怎么做呢?
simply do it: 简单地做到这一点:
$ git status .
[...]
# modified: README.txt
[...]
# the following will create a tag on the last commit
# (the one already pushed to the remote)
$ git tag -a "v0.12" -m "version 0.12"
# send the tag to the remote
$ git push --tags
# create a new branch 'dev' and immediately switch to it
$ git checkout -b "dev"
# commit the modified files to the new branch
$ git commit -m "updated README for new 'dev'-version" README.txt
# push the new branch to the remote
$ git push
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.