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

How do I get back deleted files after running git reflog then git reset HEAD@{1}?

I messed up with git after running git reset --hard HEAD~3 and lost 2 hours worth of work. I then found a post on here that explained git reflog. When I want to return to "git reset HEAD@{1}", how do I not only return, but have all files that were…
LondonGuy
  • 10,778
  • 11
  • 79
  • 151
0
votes
1 answer

git svn rebase erroring out all of a sudden

We have a relatively standard SVN server in our office, and I've been using Git-SVN with it on my local machine for the past several months without a problem. Nothing in the configuration (both on the server and on my computer) has changed in some…
jnevelson
  • 2,092
  • 2
  • 21
  • 31
0
votes
2 answers

How to assign shortcuts to git svn in intellij?

Anyone know a way to assign a shortcut to git svn dcommit in intellij ? Even better to be able to combine it with the commit altogether. Actually come to think of it perhaps a branch specific commit hook is the way to go, not sure how to do that…
barrymac
  • 2,750
  • 1
  • 20
  • 32
0
votes
1 answer

run git update-server-info on the server?

I am trying to download a source code from code.google.com using git command but getting the following error git clone https://code.google.com/p/dolphin-player/ Initialized empty Git repository in…
John
  • 8,846
  • 8
  • 50
  • 85
0
votes
2 answers

how to migrate from git-svn to gitolite and retain history

We have been using SVN and slowly the developers have been migrating to git-svn. Now we're ready to make the plunge and completely move to git (using gitolite). I am not sure how to migrate our repository into gitolite and maintain history. I…
Yehosef
  • 17,987
  • 7
  • 35
  • 56
0
votes
3 answers

Push code to SVN and GIT

I have a project that I want to push to GitHub and our internal SVN server. I have seen many references to using git-svn, but that appears to be using git commands to push to SVN and only to one server. I want to push the changes to our internal SVN…
Mike Wills
  • 20,959
  • 28
  • 93
  • 149
0
votes
2 answers

new code preserved on git branch, how to merge it back to trunk

Sequence: commit some code on trunk discover that it's got a nasty problem. make a branch delete code on trunk (deleting entire files) fix code on branch Now I want to bring the whole business back onto the trunk. A merge won't do it, I think.…
bmargulies
  • 97,814
  • 39
  • 186
  • 310
0
votes
1 answer

git svn unignore trunk after init

We have a central svn repository and are starting to have people use git locally to manage work items. When I first set up my local git repository, I set ignore-path to ignore trunk so I could just work on one branch. My coworker did not ignore…
Kenoyer130
  • 6,874
  • 9
  • 51
  • 73
0
votes
1 answer

git-svn create svn branch from svn branch

With git-svn If I have cloned svn repository with all trunk, branches and tags, how do I create a new svn branch out of a svn branch? I know I can create a new branch from trunk (master) with git svn branch, but how do I handle this from a…
Sunny Milenov
  • 21,990
  • 6
  • 80
  • 106
0
votes
1 answer

Git-svn 'refs/remotes/tags' exists; cannot create

I have a problem when trying to migrate the subversion repository to Git repository I run by following command git svn clone -s --ignore-paths="tags" svn://localhost/web . and I got the error message as below, branch_from: /branches/tags =>…
scalopus
  • 2,640
  • 3
  • 19
  • 32
0
votes
1 answer

Is it possible to add a branch to a git svn repository that was cloned from the Subversion repository's trunk?

I have a git-svn repository I had originally cloned from an svn repo's trunk, like so: http://server/svn/MxProject/trunk Since I cloned only the trunk and didn't grab the branches directory, is there a way I can access the branch without doing a…
codewario
  • 19,553
  • 20
  • 90
  • 159
0
votes
3 answers

How should I switch to trunk after I cloned an entire SVN repository with git-svn?

I cloned an entire SVN repository ( including all the branches ), using git-svn. The problem is, if I run git branch I don't get anything back. If I run git branch -a I get: git-svn What should I do now to start working on SVN's trunk? EDIT: The…
Geo
  • 93,257
  • 117
  • 344
  • 520
0
votes
1 answer

Git head matches SVN head - how to continue committing / tagging to SVN?

I was playing around with git svn set-tree and managed to set my svn trunk match my git repository's trunk. Now that I've managed to set-tree I thought I could continue use git svn normally, but it didn't work like that. I want to do a tag to SVN, I…
Ciantic
  • 6,064
  • 4
  • 54
  • 49
0
votes
1 answer

Should we move to GIT completely from GIT-SVN

We use git-svn since the very beginning of our development. Is it a better idea to move to pure git? We use to commit and checkout our code on a lot of different environments and machines. Currently we use svn to checkin/checkout code on remote…
Akash Agrawal
  • 4,711
  • 5
  • 28
  • 26
0
votes
2 answers

GIT newbie: git fetch does not yet pull data to local?

The remote repository has two branches: master, develop. Then, I checked my local branch by git branch , I notice I have only master branch, so I run command git fetch origin. After this, when I run "git branch" again, I still see only master…
Leem
  • 17,220
  • 36
  • 109
  • 159