git-svn not a git command?
I just check on my newly installed ubuntu box and it wasn’t installed even with git-core installed. A simple: sudo apt-get install git-svn or your distro equivalent should fix it.
I just check on my newly installed ubuntu box and it wasn’t installed even with git-core installed. A simple: sudo apt-get install git-svn or your distro equivalent should fix it.
The git svn fetch command to resume a git svn clone is confirmed by several sources: Git svn and Gnome blog entry (Incidentally, if during the initial clone step your connection dies or you need to stop it then to resume the clone you just have to run the above command to resume downloading the … Read more
Actually, I found an even better way with the –no-ff option on git merge. All this squash technic I used before is no longer required. My new workflow is now as follows: I have a “master” branch that is the only branch that I dcommit from and that clone the SVN repository (-s assume you … Read more
You want to git rebase -i to perform an interactive rebase. If you’re currently on your “commit 1”, and the commit you want to merge, “commit 2”, is the previous commit, you can run git rebase -i HEAD~2, which will spawn an editor listing all the commits the rebase will traverse. You should see two … Read more
I believe you can do it most simply with: git checkout -p <optional filename(s)> From the manpage: −p, −−patch Interactively select hunks in the difference between the <tree−ish> (or the index, if unspecified) and the working tree. The chosen hunks are then applied in reverse to the working tree (and if a <tree−ish> was specified, … Read more
No. Your best bet would be to set up a mirror of the svn repository in a dedicated git repository. git svn clone -s http://subversion.example.com/ mysvnclone cd mysvnclone git remote add origin git@example.com:project.git git push origin master Then you can add the git repository as a submodule to the original project cd /path/to/gitproject git submodule … Read more
Update 2013: More recent git versions authorize using merge with strategy recursive and strategy option (-X): from “Git Merge and Fixing Mixed Spaces and Tabs with two Branches”: git merge -s recursive -Xignore-space-at-eol But using “-Xignore-space-change” is also a possibility Fab-V mentions below: git merge master -s recursive -X renormalize jakub.g also comments that the … Read more
Standard Subversion layout Create a git clone of that includes your Subversion trunk, tags, and branches with git svn clone http://svn.example.com/project -T trunk -b branches -t tags The –stdlayout option is a nice shortcut if your Subversion repository uses the typical structure: git svn clone http://svn.example.com/project –stdlayout Make your git repository ignore everything the subversion … Read more
I know this question has been answered a while ago, but after reading it, I it might help adding examples of the specific git svn branch command and relate it to a typical workflow. Like kch answered, use git svn branch. Here is a full example, (note the -n for dry-run to test): git svn … Read more
You can manually add the remote branch, git config –add svn-remote.newbranch.url https://svn/path_to_newbranch/ git config –add svn-remote.newbranch.fetch :refs/remotes/newbranch git svn fetch newbranch [-r<rev>] git checkout -b local-newbranch -t newbranch git svn rebase newbranch