Subversion 的部分提交 [英] Partial Commits with Subversion

查看:18
本文介绍了Subversion 的部分提交的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

鉴于我在一个文件中进行了两个独立的更改:例如.添加了一个新方法并更改了另一个方法.

Given the case I made two independent changes in one file: eg. added a new method and changed another method.

我通常不想将两个更改作为一次提交,而是作为两次独立提交.

I often don't want to commit both changes as one commit, but as two independent commits.

在 git 存储库上,我会使用 交互模式git-add(1)hunk 拆分成更小的块:

On a git repository I would use the Interactive Mode of git-add(1) to split the hunk into smaller ones:

 git add --patch

使用 Subversion 执行此操作的最简单方法是什么?(甚至可能使用 Eclipse 插件)

What's the easiest way to do this with Subversion? (Maybe even using an Eclipse plug-in)

更新:
The Thing About Git 中,Ryan 称之为:The Tangled Working复制问题."

Update:
In The Thing About Git, Ryan calls it: "The Tangled Working Copy Problem."

推荐答案

使用 git-svn,您可以创建远程 SVN 存储库的本地 GIT 存储库,使用完整的 GIT 功能集(包括部分提交)使用它,然后将其全部推送回 SVN 存储库.

With git-svn you can make a local GIT repository of the remote SVN repository, work with it using the full GIT feature set (including partial commits) and then push it all back to the SVN repository.

git-svn (1)

这篇关于Subversion 的部分提交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆