I'm using git-svn. How can I get a list of what I've committed into git, but haven't yet committed to the SVN repository since the last git svn dcommit
? That is, how can I verify what is about to be sent if I do a dcommit?
相关问题
- Why does recursive submodule update from github fa
- Extended message for commit via Visual Studio Code
- How can I set the SVN password with Emacs 23.1 bui
- Emacs shell: save commit message
- Can I organize Git submodules in a flat hierarchy?
相关文章
- 请教Git如何克隆本地库?
- GitHub:Enterprise post-receive hook
- Git Clone Fails: Server Certificate Verification F
- SSIS solution on GIT?
- Is there a version control system abstraction for
- ssh: Could not resolve hostname git: Name or servi
- Cannot commit changes with gitextensions
- git: retry if http request failed
The easiest way I think is to do this using gitk. You will want the --all option to see all branches. If you have not used it before simply type:
You will see a graphical view of your branches. When you update from SVN, you essentially do a rebase (git svn rebase). This means any local commits that are not checked in to SVN will appear on the branch after the last SVN commit. Basically look at the commits between your remote SVN trunk and your master branch.
I use
git log --oneline --graph
:It's easy to see that commits
aaaaaaa
,bbbbbbb
, andfffffff
are on the current (master) branch. These commits either have already been or will be committed to Subversion the next time you executegit svn dcommit
. (Commitsccccccc
,ffffdffffdd
,eeeeeee
are on a separate branch which was merged into master and will not be committed to Subversion as separate commits.)The
--dry-run
option forgit svn dcommit
is very useful for finding out exactly what will be committed to Subversion. In particular that has the properties that:In general it's a good idea to do
git svn rebase
before even thinking about usingdcommit
, so that your history is linearized - otherwise merge commits may not make much sense in the Subversion history. (If you've done that, thengit log
andgitk --all
will also be essentially equivalent, but I thinkgit svn dcommit --dry-run
gives you a more accurate picture of what's about to happen, even if it's more difficult to interpret.)To just see the list of commits, here's my magic:
output: