开发者

How do you view the status of your svn-git repo?

开发者 https://www.devze.com 2022-12-11 11:43 出处:网络
I understand how to initialize a git-svn repo, create a branch, do some work, merge branch, then use git svn rebase and git svn dcommit to push back to the svn repo. But between these two commands, ho

I understand how to initialize a git-svn repo, create a branch, do some work, merge branch, then use git svn rebase and git svn dcommit to push back to the svn repo. But between these two commands, how can you get a status of what is different between the two repos? Something like a git status t开发者_StackOverflowhat tells you that you have x number of files that have been changed.


Just do a diff between your branch and upstream.

git diff --stat git-svn/master..master

Obviously, you'll have to change the branch names to whatever's applicable for your setup.


The only real way I know is to run 'git svn dcommit -n' (or git svn dcommit --dry-run) which will usually give you output like this:

$git svn dcommit --dry-run
Committing to http://yourserver.com/trunk ...
diff-tree bc923cb54847fa340d094c3da1ebd66b8fb0e63e~1 bc923cb54847fa340d094c3da1ebd66b8fb0e63e
diff-tree a05c8be4af7f82dc4de5b4778e2b58203c75eebd~1 a05c8be4af7f82dc4de5b4778e2b58203c75eebd

And then you can 'git show bc923cb54847fa340d094c3da1ebd66b8fb0e63e' to view that diff.

0

精彩评论

暂无评论...
验证码 换一张
取 消