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
135
votes
6 answers

Is git-svn dcommit after merging in git dangerous?

My motivation for trying out git-svn is the effortless merging and branching. Then I noticed that man git-svn(1) says: Running git-merge or git-pull is NOT recommended on a branch you plan to dcommit from. Subversion does not represent merges in…
Knut Eldhuset
  • 1,789
  • 3
  • 16
  • 19
127
votes
4 answers

Resuming git-svn clone

I started cloning an SVN repository using the git-svn's clone operation. After about 6 hours of importing (it's a big repo), my computer went and slept on me. Is there a way to resume the operation without redoing all of the initial work?
Brandon Yarbrough
  • 37,021
  • 23
  • 116
  • 145
125
votes
13 answers

git-svn not a git command?

While attempting to get an old svn dump of a project under git control, I ran into an interesting problem. Whenever I run git svn, I get an error saying it isn't a git command, yet there is documentation for it that I can pull up using git help. …
Cristián Romo
  • 9,814
  • 12
  • 50
  • 50
113
votes
9 answers

Git SVN error: a Git process crashed in the repository earlier

I was just trying to commit changes to the Git master. From what I have read, it seems that the idea is to delete the lock file. The message says: make sure no other Git processes are running and remove the file manually Perhaps someone knows,…
Pinchas K
  • 1,541
  • 3
  • 13
  • 19
112
votes
10 answers

Command to clear the Git Bash screen, including output buffer

Is there any command in Git, that clear the screen. for example in window command line after execute a lot of code, if you type cls, then it will clear all the previous code. so i want the same type of functionality in Git. so can anybody will tell…
naresh kumar
  • 2,165
  • 3
  • 19
  • 21
99
votes
1 answer

Why is the meaning of “ours” and “theirs” reversed with git-svn

I use git-svn and I noticed that when I have to fix a merge conflict after performing a git svn rebase, the meaning of the --ours and --theirs options to e.g. git checkout is reversed. That is, if there's a conflict and I want to keep the version…
Marc Liyanage
  • 4,601
  • 2
  • 28
  • 28
90
votes
8 answers

git-svn: what's the equivalent to `svn switch --relocate`?

An svn repository I'm mirroring through git-svn has changed URL. In vanilla svn you'd just do svn switch --relocate old_url_base new_url_base. How can I do this using git-svn? Simply changing the svn url in the config file fails.
kch
  • 77,385
  • 46
  • 136
  • 148
87
votes
18 answers

GitHub: Clone succeeded, but checkout failed

I am having some problems working with git clone.The files are downloaded in my local git folder. Running the command git checkout -f HEAD gives me- Error: 'The unable to write new index file error caused by the lack of disk space'. I've…
jamie_y
  • 1,719
  • 2
  • 13
  • 20
86
votes
6 answers

git refname 'origin/master' is ambiguous

I have a git repository that is tracking several remote branches: $ git branch -a * master remotes/git-svn remotes/origin/master remotes/trunk When I try to setup a default one I get the following error: $ git branch…
gypaetus
  • 6,873
  • 3
  • 35
  • 45
85
votes
1 answer

git merge different repositories?

I've been using SVN for all my projects. Sometimes project B is originating as a copy from project A. When project A has a generic change, I can use svn merge A within directory B and it will merge those changes. Now, if I wanted to use git. I don't…
baloo
  • 7,635
  • 4
  • 27
  • 35
80
votes
3 answers

Should I have to add files to git every time I want to commit?

I'm new to git, coming from SVN world. So far, it seems a lot more useful, but I am still working out the kinks. Currently, my workflow is like this: make changes > git add . > git commit > enter log message What I don't understand is why I seem…
Hamy
  • 20,662
  • 15
  • 74
  • 102
74
votes
7 answers

How to migrate code from SVN to GIT without losing commits history?

I would like to know the recommended way to move our code from a SVN repository to a GIT repository, so that we transition our developers team & start using GIT. Can we do the transition and keep all the commits done in the SVN repository ? Also,…
simo
  • 23,342
  • 38
  • 121
  • 218
74
votes
11 answers

Git is really slow for 100,000 objects. Any fixes?

I have a "fresh" git-svn repo (11.13 GB) that has over a 100,000 objects in it. I have preformed git fsck git gc on the repo after the initial checkout. I then tried to do a git status The time it takes to do a git status is anywhere from…
manumoomoo
  • 2,707
  • 3
  • 24
  • 25
74
votes
9 answers

How to import svn branches and tags into git-svn?

I have got a central SVN repository I must commit to, but I've got a passion for git (like any other developer I know). The case is well known. Then I read about git-svn and gave it a try. Since I don't need the full history, just from two months or…
Luís Guilherme
  • 2,620
  • 6
  • 26
  • 41
66
votes
2 answers

remove a file from GIT control

Possible Duplicate: git - removing a file from source control (but not from the source) I have a .classpath file which is currently in GIT repository. After I pulled from remove repository(git pull origin master). How can I remove this file from…
Leem.fin
  • 40,781
  • 83
  • 202
  • 354