【发布时间】:2017-04-06 09:05:17
【问题描述】:
根据http://nvie.com/posts/a-successful-git-branching-model/:
$ git checkout -b release-1.2 develop
Switched to a new branch "release-1.2"
$ ./bump-version.sh 1.2
Files modified successfully, version bumped to 1.2.
$ git commit -a -m "Bumped version number to 1.2"
[release-1.2 74d9424] Bumped version number to 1.2
1 files changed, 1 insertions(+), 1 deletions(-)
After creating a new branch and switching to it, we bump the version number. Here,
bump-version.sh is a fictional shell script that changes some files in the working
copy to reflect the new version. (This can of course be a manual change—the point
being that some files change.) Then, the bumped version number is committed.
但是我们不是已经将分支命名为release-1.2,我假设我们会在发布时将master标记为1.2,那么./bump-version.sh 1.2到底发生了什么变化?
谢谢。
【问题讨论】:
-
不知道你的 shell 脚本在做什么。但是您可以删除标签
git tag -d tag1。您需要检查谁在维护 shell 脚本才能知道它到底在做什么。 -
这里的人怎么能猜到或知道 你的 shell 脚本在做什么?根据您的平台执行
cat bump_version.sh或type bump_version.sh并查看代码。 -
我投票结束这个问题,因为这是一个关于尚未发布的本地脚本的问题
-
大家好,我完全阅读了这个问题,你会看到我指的是一个流行的 Github 进程(参见我发布的 URL),我评论中的文字包括以下内容:“在创建新的分支并切换到它,我们会增加版本号。这里,bump-version.sh 是一个虚构的 shell 脚本,它会更改工作副本中的一些文件以反映新版本。所以我的问题是:当他们说“更改工作副本中的一些文件以反映新版本”时,他们是什么意思。\