With svn-git
, how can I see what is about to be committed with git svn dcommit
?
Here are the commands I run:
git svn clone file:///svn/test1 test1-git cd test1-git echo "first line" > test1.txt git add test1.txt git commit
Now it's committed to the git repository -- good. But before I run git svn dcommit
I'd like to see a diff that contains the changes that would be committed to the SVN repository.
Beware that the conversion process can take a significant amount of time for larger repositories, even when cloning from a local SVN repository. As a benchmark, converting a 400MB repository with 33,000 commits on main took around 12 hours to complete.
# Clone a repo with standard SVN directory layout (like git clone): git svn clone http://svn.example.com/project --stdlayout --prefix svn/ # Or, if the repo uses a non-standard directory layout: git svn clone http://svn.example.com/project -T tr -b branch -t tag --prefix svn/ # View all branches and tags you have ...
No interaction between them. Just ignore the . git folder for SVN and the . svn folder for Git and you should be fine.
This retrieves all the changes from the SVN repository and applies them on top of your local commits in your current branch. This works like, you know, a rebase between two branches :) You can also use git svn fetch to retrieve the changes from the SVN repository but without applying them to your local branch.
If your remote branch is called git-svn
(it is called that if you just do a plain git svn clone
) then you can see a diff between the current branch and git-svn
:
git diff git-svn HEAD
You would see all changes that are present in your current branch but not in the svn repository.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With