How to use TortoiseGit with a remote SVN repository accessed via ssh over a non-standard port

2,134 views
Skip to first unread message

nikki.lo...@gmail.com

unread,
Apr 10, 2014, 7:32:39 AM4/10/14
to tortoise...@googlegroups.com
Our company code sources are held in an SVN repository, which we access by using ssh over a non-standard port.

Up to now, I have been using TortoiseSVN, using a url of the form svn+ssh://@headoffice/home/svn/project/trunk. @headoffice indicates the use of a putty saved session called headoffice (which has stored port, login name, and ssh key).

I want to start using TortoiseGit locally, as I want to be able to check in minor modifications locally, and only push them to the SVN repository when I am happy the task is finished.

I am not familiar with Git yet.

I thought I should start with a Git Clone of the SVN branch, so I chose Git Clone from the context menu, filled in the url, and loaded in my putty key (just to be sure). I did not tick "From SVN repository", as I did not want to clone the entire repository, just the trunk.

When I pressed OK, I got the error "fatal: Unable to find remote helper for 'svn+ssh'".

Is there some way for this to work?

If it does work, will it achieve what I want - i.e. to make multiple commits locally, then push only the sum total of the changes to SVN? Or will it push all my commits up to SVN individually?

Or would I be better checking out using TortoiseSVN, then building a local git repository in the same folder, and checking it back in using TortoiseSVN when I am ready to update the master? This does work, but it is a bit of a pain having to keep track of local deletes, renames and adds, and remembering to do them again in SVN.

Yue Lin Ho

unread,
Apr 10, 2014, 10:18:56 PM4/10/14
to tortoise...@googlegroups.com, nikki.lo...@gmail.com
Hi:

nikki.lo...@gmail.com於 2014年4月10日星期四UTC+8下午7時32分39秒寫道:
Our company code sources are held in an SVN repository, which we access by using ssh over a non-standard port.
Up to now, I have been using TortoiseSVN, using a url of the form svn+ssh://@headoffice/home/svn/project/trunk. @headoffice indicates the use of a putty saved session called headoffice (which has stored port, login name, and ssh key).
I want to start using TortoiseGit locally, as I want to be able to check in minor modifications locally, and only push them to the SVN repository when I am happy the task is finished.
I am not familiar with Git yet.

I thought I should start with a Git Clone of the SVN branch, so I chose Git Clone from the context menu, filled in the url, and loaded in my putty key (just to be sure). I did not tick "From SVN repository", as I did not want to clone the entire repository, just the trunk.
 
First thing: I never use SSH, but I did some "git svn clone" via TortoiseGit. :)
So, as I know:
1. You should tick "From SVN repository".
2. If you just want "trunk", then un-check "Tags" and "Branch" checkbox.
(see attached file.)
 
When I pressed OK, I got the error "fatal: Unable to find remote helper for 'svn+ssh'".
Is there some way for this to work?

If it does work, will it achieve what I want - i.e. to make multiple commits locally, then push only the sum total of the changes to SVN?

Yes.
You can make some commits locally, 
then combine them to one commit, 
then "SVN DCommit..." it to svn repository.
 
Or will it push all my commits up to SVN individually?

Yes.
1. make 3 commits A-B-C
2. "SVN DCommit..." these commits.
3. the SVN repository will add A-B-C commits.
(make sure these commits are one-by-one. -> git svn has some limitation.)
(I only try "SVN DCommit..." once. :P )
 
Or would I be better checking out using TortoiseSVN, then building a local git repository in the same folder, and checking it back in using TortoiseSVN when I am ready to update the master? This does work, but it is a bit of a pain having to keep track of local deletes, renames and adds, and remembering to do them again in SVN.

Good Luck. ^_^

Yue Lin 
SvnCloneEx.png

nikki.lo...@gmail.com

unread,
Oct 22, 2014, 9:25:37 AM10/22/14
to tortoise...@googlegroups.com, nikki.lo...@gmail.com
Thanks very much - I did not get notified of this reply by email, so have only just seen it.

I'm trying that now. If I combine commits, does that lose all the intermediate information forever? I.e. after combining, can I still see diffs between the intermediate commits?

What happens if I create branches - will they create branches in SVN too? I'd like to be able to have revisions in my local Git repository that never get committed to SVN - is that possible?

Yue Lin Ho

unread,
Oct 22, 2014, 10:54:51 AM10/22/14
to tortoise...@googlegroups.com, nikki.lo...@gmail.com


nikki.lo...@gmail.com於 2014年10月22日星期三UTC+8下午9時25分37秒寫道:
Thanks very much - I did not get notified of this reply by email, so have only just seen it.

I'm trying that now. If I combine commits, does that lose all the intermediate information forever? I.e. after combining, can I still see diffs between the intermediate commits?


Yes and No.
Yes means it is still in git repository, and you can use reflog to get it back.
No means you can not see it easily/directly and after some cleanup command, it's gone.
Because reflog is not basic skill, there is a simple rule for beginner:
Always creating a branch to keep the commits before re-writing the history.
 
What happens if I create branches - will they create branches in SVN too?

I never try this, but I guess it won't.
Perhaps try it later. :P
 
I'd like to be able to have revisions in my local Git repository that never get committed to SVN - is that possible?

Yes, very easy. Creating a branch for them and don't push that branch to remote.

Yue Lin Ho
 
Reply all
Reply to author
Forward
0 new messages