git 有等效的 bazaar automv 插件吗?

发布于 2024-07-10 00:02:30 字数 183 浏览 8 评论 0原文

我在项目中使用的唯一分布式版本控制系统是 bazaar。 除了如何结帐之外,我对 git 和 Mercurial 不太了解。 我喜欢bazaar的原因是automv插件。 它会检测我何时手动移动/删除文件(从命令行/IDE 等),当我匆忙时,我往往会做很多事情。 但 bazaar 真的很慢,我正在考虑转向 git。 git 有类似的功能吗?

The only distributed revision control system I've used on my projects is bazaar. I don't know much about git and mercurial except how to do checkouts. The reason I like bazaar is the automv plugin. It detects when I've moved/deleted files manualy (from command line/ide etc.) which I tend to do alot when I'm in a hurry. But bazaar is really slow and I'm thinking of moving to git. Does git have something similar to this functionality?

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

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

发布评论

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

评论(3

爱的十字路口 2024-07-17 00:02:30

Git 在移动/重命名情况下的工作方式有很大不同。 Git 仅跟踪内容,因此它知道文件 X 在一次提交时具有 SHA1 哈希值 abc123...,而文件 Y 在一次提交时恰好具有相同的哈希值 abc123...下一次提交。 因此,当查看历史记录或其他内容时,Git 工具会得出结论:此时文件 X 必须已重命名为文件名 Y。

通过这种方式,Git 重建了从一个提交移动到下一个提交所采取的操作,而无需在提交时了解这些信息。 它可以事件检测您重命名文件并更改文件中的某些内容的情况(当然,它不是通过比较 SHA1 哈希值来做到这一点,而是通过在文件中更改的文件之间进行文本比较来做到这一点)犯罪)。

The way Git works in the move/rename situation is quite different. Git tracks only content, so it knows that file X had SHA1 hash abc123... at one commit, and file Y happened to have the same hash abc123... at the next commit. So the Git tools, when viewing history or whatever, conclude that file X must have been renamed to filename Y at that point.

In this way, Git reconstructs the actions taken to move from one commit to the next, without having to have that knowledge at commit time. It can event detect situations where you rename a file and change something within the file (of course it doesn't do this by comparing SHA1 hashes, but by doing a text compare between files that were changed in a commit).

╰沐子 2024-07-17 00:02:30

您可能正在寻找 git add --all< /代码>

更新 git 已经知道的文件(与 --update 相同)并添加所有未被 .gitignore 忽略的未跟踪文件机制。

(强调我的。)

You might be looking for git add --all:

Update files that git already knows about (same as --update) and add all untracked files that are not ignored by .gitignore mechanism.

(Emphasis mine.)

故事未完 2024-07-17 00:02:30

仅供您参考,只有芭莎知道动作。 SVN、Git、hg 只知道带版本的复制和删除。 我认为不同。 但正如之前提到的,git 很好地处理了 automv(据我所知),只有聪明地在移动后快速提交。 我听说 egit 在重命名类后会自动提交。

Just for your information only bazaar knows moves. SVN, Git, hg only know copy with version and delete. I think that a different. But as mentioned before git handles the automv very well (as far as I heard), only be so clever to commit very quickly after move. I heard egit makes an autocommit after you rename a class.

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