Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to see 'git svn dcommit' changes before dcommitting? [duplicate]

Tags:

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.

like image 663
Frank Avatar asked Mar 19 '12 18:03

Frank


People also ask

How long does Git SVN clone take?

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.

How do I clone a SVN code?

# 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 ...

Can I use Git and SVN at the same time?

No interaction between them. Just ignore the . git folder for SVN and the . svn folder for Git and you should be fine.

What does Git SVN fetch do?

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.


1 Answers

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.

like image 153
Tomas Markauskas Avatar answered Oct 11 '22 23:10

Tomas Markauskas