git svn 在初始化后忽略主干
我们有一个中央 svn 存储库,并开始让人们在本地使用 git 来管理工作项。
当我第一次设置本地 git 存储库时,我设置了ignore-path来忽略主干,这样我就可以只在一个分支上工作。我的同事并没有忽视行李箱。直到我们开始使用第三个裸存储库来相互推送/拉取分支之前,这一切都很好。
当我拉他们的 git 分支时,它把主干当作一个添加,现在一团糟。
当我运行 git svn 时,我现在确实希望它同步主干。如何从本地存储库重新添加/取消忽略主干?
We have a central svn repository and are starting to have people use git locally to manage work items.
When I first set up my local git repository, I set ignore-path to ignore trunk so I could just work on one branch. My coworker did not ignore trunk. This was fine until we started to use a third bare repository to push/pull branches to each other.
When I pull their git branch, it treated trunk as an add and now its a mess.
When I run git svn I now do want it to sync the trunk. How do I re-add/unignore trunk from my local repository?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您使用 git-svn 访问 svn 存储库时,最好的方法是仅使用 subversion 存储库来共享代码。
当您运行 git svn fetch 时,应该导入分支的新 svn 修订版。
现在您已经共享了 git 修订版,您必须使用 git rebase --interactive 和 gitcherry-pick 来线性化历史记录,并使用 git rebase --interactive 将其推送到 subversion >git svn dcommit。
1 托马斯·费里斯·尼古拉森 和 克里斯·布朗详细描述了当你想与共享 svn 镜像交换代码时你必须做什么。
When you use git-svn to access an svn repository, the best way is to only use the subversion repo to share code¹.
When you run
git svn fetch
, the new svn revisions of your branch should be imported.Now that you already have shared git revisions, you have to use
git rebase --interactive
andgit cherry-pick
to linearize the history, and push it into subversion withgit svn dcommit
.¹ Thomas Ferris Nicolaisen and Kris Brown described in detail what you have to do when you want to exchange code with an shared svn mirror.