相关疑难解决方法(0)

什么是git标签,如何创建标签以及如何结帐git remote tag(s)

当我签出远程git标签时使用这样的命令:

git checkout -b local_branch_name origin/remote_tag_name
Run Code Online (Sandbox Code Playgroud)

我得到这样的错误:

error: pathspec `origin/remote_tag_name` did not match any file(s) known to git.
Run Code Online (Sandbox Code Playgroud)

当我使用git tag命令时,我可以找到remote_tag_name.

git git-checkout git-tag

468
推荐指数
4
解决办法
56万
查看次数

如何仅为标记提交设置单独的分支?

我的任务是组织存储库,除了其他分支之外还有一个专用分支,我们只存储已发布版本的提交.以下是我想要实现的简化方案:

| trunk    |           | releases |
|----------+-----------+----------|
| commit 1 |           |          |
| commit 2 | v0.1 ---> | tag 1    |
| commit 3 |           |          |
| commit 4 |           |          |
| commit 5 |           |          |
| commit 6 | v0.2 ---> | tag 2    |
| commit 7 |           |          |
| commit 8 |           |          |
| commit 9 |           |          |
Run Code Online (Sandbox Code Playgroud)

这对我来说有点太先进,所以我很感激如何做到这一点!我不确定如何能够在"版本"分支中拥有第二个标记,而不必导入所有中间提交.这有可能吗?

此外,如果您有更好的方案来实现相同的目标(目标是仅为发布版本设置专用分支),请不要犹豫,建议!

git

3
推荐指数
1
解决办法
230
查看次数

标签 统计

git ×2

git-checkout ×1

git-tag ×1