将本地Git提交合并为git-svn的一个提交 [英] Combine local Git commits into one commit for git-svn

查看:87
本文介绍了将本地Git提交合并为git-svn的一个提交的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当前,当我运行 git svn dcommit 时,git为自上次与SVN同步以来进行的每个本地提交在SVN中创建一个单独的提交。 dcommit 是否可以将我最近的所有本地提交合并为一个SVN提交?

Currently, when I run git svn dcommit git creates a separate commit in SVN for every local commit I've made since last syncing with SVN. Is there any way for dcommit to instead combine all my recent local commits into one commit for SVN?

推荐答案

git rebase remotes/trunk --interactive 

应该带您进入菜单,在这里您可以选择提交或将它们全部压缩为1个提交,以避免污染svn存储库。 是一个非常好的(但简短的)工作资源加上git-svn。

should bring you to the menu where you can pick commits or squash them all into 1 commit in order to avoid polluting your svn repository. This is a really good (but short) resource on working with git-svn.

这篇关于将本地Git提交合并为git-svn的一个提交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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