如何将 SourceTree 中的分支移动到文件夹中?
How to move branch in SourceTree into Folder?
我在git中有以下分支结构:
master
feature-2
bugfix/bug-1
feature/feature-1
现在我想将分支 feature-2
移动到 feature
文件夹中。
如何将分支移动到文件夹中?通过 SourceTree 或 git 命令行。
您可以重命名此分支:
git branch -m feature-2 feature/feature-2
您也可以创建新分支并删除旧分支:
git checkout feature-2
git checkout -b feature/feature-2
git branch -d feature-2
对于分支名称中具有相同 folder/structure
的分支,SourceTree 似乎显示 "folders"。
您应该简单地创建一个名为 feature/feature-2
的新分支,指向与当前 feature-2
分支相同的提交。然后推送新的分支,删除旧的。
You can name your branches in a folder structure-like format and they appear as folders in SourceTree. For example you could name it as features/issue_1539
and SourceTree will display features
as a folder.
https://answers.atlassian.com/questions/200282/sourcetree-categorize-branches
我在git中有以下分支结构:
master
feature-2
bugfix/bug-1
feature/feature-1
现在我想将分支 feature-2
移动到 feature
文件夹中。
如何将分支移动到文件夹中?通过 SourceTree 或 git 命令行。
您可以重命名此分支:
git branch -m feature-2 feature/feature-2
您也可以创建新分支并删除旧分支:
git checkout feature-2
git checkout -b feature/feature-2
git branch -d feature-2
对于分支名称中具有相同 folder/structure
的分支,SourceTree 似乎显示 "folders"。
您应该简单地创建一个名为 feature/feature-2
的新分支,指向与当前 feature-2
分支相同的提交。然后推送新的分支,删除旧的。
You can name your branches in a folder structure-like format and they appear as folders in SourceTree. For example you could name it as
features/issue_1539
and SourceTree will displayfeatures
as a folder.
https://answers.atlassian.com/questions/200282/sourcetree-categorize-branches