在远程仓库中保持单一头脑?
我确信这个问题之前/在某个地方已经得到了回答,因为我认为这是一个常见问题,我只是找不到它。
基本上我有一个工作代码的头部,以及具有各种代码路径的分支。像平常一样。不过,当我推送时,我确实希望将所有这些分支上传到远程存储库。我使用 push -f
来实现这一点。现在的问题是我当前的工作分支,我想它被认为是头部,因为从技术上讲它比我认为的头部分支更新。
话虽如此,对于远程存储库,我希望将默认分支视为.. my.. head (即我认为的头/主代码路径)。请注意,我正在使用 BitBucket,但我假设这是 Mercurial 的问题,而不是 BitBucket 的问题。
有什么想法吗?
I'm sure this has been answered before/somewhere, as i assume it's a common issue, i just can't find it.
Basically i have a head, of working code, and branches with various code paths. Like normal. Though when i push i do want all of these branches uploaded to the remote repo. I do so with push -f
. Now the problem is my current working branch, i guess is considered the head because technically it is newer than what i consider the head branch.
With that said, for the remote repo, i would like the default branch viewed to be .. my.. head (ie, what i consider the head/main code path). Note i am using BitBucket, but i'm assuming this is an issue with Mercurial, not BitBucket.
Any thoughts?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,首先我认为必须重新定义一些词汇才能正确理解每个词汇:
主分支可以通过 HG 从开始时分配的名称“默认”来识别,但这就是所有
commit
、pull
或push
,称为tip
。它只是分部负责人之一,仅此而已。因此,您在这里观察到的是,每次您将工作从本地存储库推送到 BitBucket 时,提示都会分配给您在本地存储库上所做的最新提交。
默认情况下,BitBucket 开始向您显示提示,据我所知,无法更改这一点,但您可以在源代码查看器中轻松地从一个分支导航到另一个分支。
Well, first I think that some vocabulary must be redefined in order to understand each properly:
The main branch is identifiable by it's name "default" assigned form the start by HG, but that's all
commit
, apull
or apush
, is called thetip
. It is one of the branch head, nothing more.So, what you're observing here is that each time you push your work from your local repository to your BitBucket one, the tip is assigned to the latest commit you did on your local repository.
By default, BitBucket start showing you the tip, and as far as I know, ther is no way to change that, but you can easily navigate from one branch to another in the source viewer.