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
1 answer

How can I do a force commit using git-svn?

I have a dev branch I'm working on and want to commit it. However through an unfortunate series of events which I won't get into, my git svn thinks its already up to date and there is nothing to commit. Essentially right now I want to clobber the…
Aaron Silverman
  • 22,070
  • 21
  • 83
  • 103
1
vote
2 answers

fatal: unable to run 'git-svn'

I've never seen this one before. I'm creating a development on a new Mac by cloning several svn repositories to local git repositories. Several pulled just fine, but one is being stubborn. They're all being pulled from the same svn server and there…
Rob Wilkerson
  • 40,476
  • 42
  • 137
  • 192
1
vote
1 answer

.gitignore is out of date in git-svn

I wanted to do git svn dcommit but I am getting Merge conflict during commit: File or directory '.gitignore' is out of date; try updating: resource out of date; try updating at /usr/lib/git-core/git-svn line 922 how to update from svn repo only…
MR.GEWA
  • 833
  • 1
  • 15
  • 37
1
vote
2 answers

How to rename an SVN branch through all revisions (history)?

How can I rename a branch in SVN through all revisions so that it looks like it always had the new name when checking the log? I understand that there may be no SVN client command for this, but is there anything I could do on the server? The…
Marc
  • 9,012
  • 13
  • 57
  • 72
1
vote
2 answers

Importing non standard layout svn into git

I have a local svn repo on my hard-drive which has directory structure as follows : [root] Project1/ Project2/ Project3/ Project4/ As you noticed this not at all a standard SVN layout. Now I want to create a new git repo importing all these…
Shardul
  • 27,760
  • 6
  • 37
  • 35
1
vote
1 answer

Adding SVN author file to git repo after a conversion and commit with git-svn

I recently switched over to using git and followed these instructions to convert my SVN repository. However, I failed to follow the instructions to make the authors file, and I have already committed my converted repository and have been working on…
user1027169
  • 2,627
  • 3
  • 27
  • 50
1
vote
1 answer

Clone a git repository into subdirectory of a subversion repository

I have an existing SVN repository, which has a "common" directory containing modules shared by different projects. The layout is like…
Alexander
  • 83
  • 1
  • 4
1
vote
2 answers

git-svn not working, reporting "fatal: cannot exec 'git-svn': Not a directory"

I am trying to migrate an svn repo to git. but i am stucked at git svn clone https://svn.xxx.com/repos/xxx/trunk ~/temp which throws a "fatal: cannot exec 'git-svn': Not a directory" error say i'm in directory ~/temp, even i run just "git svn", I…
Jinzhao Huo
  • 847
  • 11
  • 17
1
vote
2 answers

Git cloned from svn repository doesn't recognize remote

Today I got our svn repository cloned into git. I had some uncommitted work though, so I svn commit them and then went to pull them into the git repository. The problem is, git seems to be somehow confused about the svn repository. First of all, git…
Shahbaz
  • 46,337
  • 19
  • 116
  • 182
1
vote
1 answer

Import git repo with multiple initial commits into svn

I basically have the following git repo layout x ---- a -------------- b -------------- c ----> y -- 1 -- 2 -- ┛ z -- i -- j -- ┛ where x, y, z are initial commits. I have these multiple initial commits because I merged multiple git…
oschrenk
  • 4,080
  • 4
  • 22
  • 25
1
vote
1 answer

Any way to default git svn dcommit to fail if code is out of date?

I like how (normal) git won't let me push if I haven't rebased with the latest code. However with git svn, when I do git svn dcommit it automatically rebases (i.e. git svn rebase) and then commits. Is there a way I can have it throw up an error…
Aaron Silverman
  • 22,070
  • 21
  • 83
  • 103
1
vote
0 answers

Splitting large svn repository into multiple git repositories and tracking history across "svn mv"

I've got a large svn repository which I'm splitting and migrating to several git repositories. So this single svn repository, software/project_1/ /project_2/ /project_X/ will become these git…
ajwood
  • 18,227
  • 15
  • 61
  • 104
1
vote
1 answer

How to make issue# mandatory in GIT while committing

We are setting up GIT. We want to make the user mandatory to enter the issue # in the beginning of comment. LIke "Issue 3222: Fix for result variations". Is there a way to configure some sort of regular expression so that this check is made…
Satish
  • 170
  • 3
  • 12
1
vote
1 answer

git-svn with strict permission

I am working on a svn repository out of my control. It uses a standard layout with very strict permissions. I have't read permission to the parent folder. svn://foo.bar/project/ svn://foo.bar/project/branches But I can read…
Yaocl
  • 194
  • 1
  • 12
1
vote
1 answer

Git local developer live version how to?

To be specific with the question i will list my scenario below, I have local git version installed in my windows machine, this is where i do the development (in developer branch). Then i upload it to the developer subdomain server for testing, once…
mahen3d
  • 7,047
  • 13
  • 51
  • 103