Questions tagged [git-svn]

git-svn is a bidirectional bridge between git and Subversion allowing to use a remote Subversion repository as a local Git repository while still be able to send changes back to Subversion.

This function allows a developer to work in git locally while still using a SVN repository as the master revision control system. They can use all features of git locally, and then check their files into a Subversion server when they are ready to commit. Running git locally allows the developer to use the staging area, do branching and merging, rebasing, cherry-picking, etc.

Basic Commands:

This makes a local git copy of the SVN repository:

git svn clone url://path/to/repo -s

Work with the files using the local Git repo. When ready to commit changes to git:

git commit -am 'What I worked on'

To commit back to the master SVN server:

git svn dcommit

If working with other developers and a merge is necessary, git-svn rebase pulls any changes from SVN to your local git repository.

1931 questions
1
vote
3 answers

Make a git commit unpushable to Subversion?

I use git locally, and git-svn to work with a shared Subversion repository. I have a local branch with some parameter changes that are relevant to my test environment, but that I would never want to share with everyone else. Right now the way I'm…
UltraNurd
  • 1,314
  • 2
  • 14
  • 24
1
vote
0 answers

How to make git to clone svn settings also?

I'd like to create a read-only Git mirror of a SVN repository. I don't need to setup the Git->SVN direction and I've already done the SVN-Git synchronization. Now I would like to somehow "clone" the git-svn setup from the Git server to a local Git…
Danstahr
  • 4,190
  • 22
  • 38
1
vote
1 answer

SVN: how can I merge changes to a local repository to a master repository, preserving history?

For reasons to long to describe here, I created a local SVN repository, copied the contents of a remote repository, and make a total of 60 commits to it. In the mean time, the remote repository hasn't changed a single bit. Now I want to get those 60…
mbvlist
  • 13
  • 2
1
vote
1 answer

Migrate SVN history to GIT for certain files

I am converting a PHP application that is stored in a SVN repository to an MVC framework and I would like to store the new code in a GIT repository. Most of what I am copying from the old code is Models that we have created over time. The commit…
yakatz
  • 2,142
  • 1
  • 18
  • 47
1
vote
1 answer

Pushing from git into a subversion repository

I have my work in a git repository, some of my coworkers want to incorporate it into their subversion repository. I'm going to keep working with git, but it would be nice have a subversion repo as a remote that I can push to once in a while. I…
Michael
  • 8,446
  • 4
  • 26
  • 36
1
vote
3 answers

remove data from a svn synchronized git repository

we have a fairly huge svn repository that i access using git. so far everything was working fine. now someone accidentally added some huge chunks of binary data to the svn repository. (hundreds of MB!) of course git also sucked in those chunks…
oliver
  • 9,235
  • 4
  • 34
  • 39
1
vote
1 answer

Git-svn gets confused over a tag with the same name as a previously deleted one

This is the scenario: I copied my subversion trunk into a tag "A". I then ran 'git svn fetch' from my local repository which found the branch point and added it as the remote branch 'svn/tags/A'. Later I removed tag "A" from subversion, and again…
Hans Sjunnesson
  • 21,745
  • 17
  • 54
  • 63
1
vote
3 answers

Managing sources across sites

We have several sites and are using one centralized subversion repository. The repository is large and network bandwidth means it takes several hours to get sources between sites. What you would advise? One option is to start using Git but it could…
yart
  • 7,515
  • 12
  • 37
  • 37
1
vote
1 answer

Why am I getting this error trying to use git with svn

Why am I getting this error trying to use git with svn. I am doing the following steps and getting some crazy errors. git svn clone -s http://svn/java/project project cd project git svn show-ignore > .gitignore git checkout -b dev I get the…
techsjs2013
  • 2,607
  • 5
  • 20
  • 25
1
vote
0 answers

Why is git creating empty directory: build

Why is git creating empty directory: build. I am cloning a SVN repo with the following commands git svn clone -s http://svn/java/project project and I see that git created a empty directory that I don't see in SVN, I keep removing it but everytime…
techsjs2013
  • 2,607
  • 5
  • 20
  • 25
1
vote
1 answer

Is "git-svn clone" on linux the same as "git svn clone" on the mac?

Is "git-svn clone" on linux the same as "git svn clone" on the mac? On Linux I know I can do the following command to clone a svn repo git-svn clone -s http://example.com/my_subversion_repo local_dir but on my MAC I can't find git-svn so will the…
techsjs2013
  • 2,607
  • 5
  • 20
  • 25
1
vote
1 answer

Using Git on Mac? I cant find git-svn

I am trying to use git on the Mac OS X and I can't find git-svn to do something like git-svn clone -s http://example.com/my_subversion_repo local_dir is git svn clone -s http://example.com/my_subversion_repo local_dir The same?
techsjs2013
  • 2,607
  • 5
  • 20
  • 25
1
vote
1 answer

Convert All Subversion Branches to Git Tags Using PowerShell After a git svn

There are lots of examples of converting Subversion branches to Git tags after performing git svn clone in Linux and Unix. I was able to use the steps from this blog post up to this step (step 6 in the post). I need to port the script to PowerShell.…
gabe
  • 1,873
  • 2
  • 20
  • 36
1
vote
1 answer

How to revert multiple revisions with git-svn

I need to revert multiple revisions (e.g. 28693, 28756, 28747) which are already in svn repo. With svn I can achieve this with one command: svn merge -c -28693,-28756,-28747 https://repository/trunk How to make the same with git-svn?
Kamil Dziedzic
  • 4,721
  • 2
  • 31
  • 47
1
vote
1 answer

git svn and do not download some files

I would like to clone a SVN repository with git-svn, and without downloading some -- unuseful for me -- 'huge' files (recognized by the extension because they are not all in the same folder). git-update-index --assume-unchanged or git-gc allow to…