如何将集市存储库向上移动一级?

发布于 2024-12-05 15:10:39 字数 437 浏览 5 评论 0原文

我有一个像这样的项目层次结构,其中有一个在 subFolder_1 中创建的集市存储库。

 a_folder
   +-- subFolder_1
       +-- .bzr
       +-- ... (more content)
   +-- subFolder_2

我现在想将 bazaar 存储库上移一级,就像我在 a_folder 中创建它一样。

新结构应如下所示:

 a_folder
   +-- .bzr
   +-- subFolder_1
       +-- ... (more content)
   +-- subFolder_2

我想保留历史记录(提交日志和提交内容)。我应该如何进行?

I have a project hierarchy like this, with a bazaar repository that has been created in subFolder_1.

 a_folder
   +-- subFolder_1
       +-- .bzr
       +-- ... (more content)
   +-- subFolder_2

I now would like to move the bazaar repository one level up, like if I had created it in a_folder.

The new structure should then look like this:

 a_folder
   +-- .bzr
   +-- subFolder_1
       +-- ... (more content)
   +-- subFolder_2

I would like to keep the history (commit logs and content of the commits). How should I proceed?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

寒冷纷飞旳雪 2024-12-12 15:10:40

我只是采用了简单的方法:将 .bzr 目录向上移动一级。
下一次提交,随着每个路径的修改(不同的根层次结构),所有内容都被删除/添加。
除此之外,它似乎有效。我没有注意到任何副作用。

I just went the easy way: moved the .bzr directory one level up.
Next commit, everything was removed / added as every path was modified (different root hierarchy).
Aside from that, it seems to work. I didn't notice any side effect.

挥剑断情 2024-12-12 15:10:39

在尝试以下操作之前先进行备份:

cd subFolder_1

# tell bzr that all your files moved into a subFolder_1:
bzr mkdir subFolder_1
bzr mv <all the files in subFolder_1> subFolder_1

# move the .bzr dir to a_folder
mv .bzr ..

# move your files back to where they belong
mv subFolder_1/<all the files in subFolder_1> .
rmdir subFolder_1

# now everything should be as you want it
cd ..
bzr commit

Make a backup before trying the following:

cd subFolder_1

# tell bzr that all your files moved into a subFolder_1:
bzr mkdir subFolder_1
bzr mv <all the files in subFolder_1> subFolder_1

# move the .bzr dir to a_folder
mv .bzr ..

# move your files back to where they belong
mv subFolder_1/<all the files in subFolder_1> .
rmdir subFolder_1

# now everything should be as you want it
cd ..
bzr commit
ま柒月 2024-12-12 15:10:39

只需将 a_folder(subFolder_1 和 subFolder_2)的内容复制到 subFolder_1 中,当然 .bzr 除外。
添加并提交。
使用 bzr +-- ...(更多内容) 移动到新创建的 subFolder_1。
然后,使用资源管理器将您的顶级旧文件夹 +-- subFolder_1 重命名为 a_folder
然后您还可以将您的项目推送到其他名称/分支。

Just copy content of a_folder (subFolder_1 and subFolder_2) inside subFolder_1 except .bzr of course.
Add and commit.
Move with bzr +-- ... (more content) to newly created subFolder_1.
Then, rename with explorer your top old-folder +-- subFolder_1 to a_folder.
Then you can also push your project to nother name/branch.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文