I’m in the process of migrating our Subversion repositories to a set of git repositories on my WebFaction space. Our svn repository structure uses some svn:externals, so I’m trying to replace them with the git-subtree extension, but I’m not sure how to set it up or install it. I’ve used git a fair amount, but I’m far from being a pro. Any ideas, folks?

This question is marked "community wiki".

asked 14 Jul '11, 19:26

nitefloat's gravatar image

nitefloat
312
accept rate: 0%


You should be able to install git-subtree by:

  • Installing git from source
  • Cloning the git-subtree source repository
  • Copying the file 'git-subtree.sh' into your git scripts directory

Compiling git from source

These commands can compile git from source and install it into ~/git

mkdir $HOME/git
mkdir $HOME/src
cd $HOME/src

VER=1.7.6

wget -c "http://kernel.org/pub/software/scm/git/git-$VER.tar.gz"
tar -xzf git-$VER.tar.gz
cd git-$VER
./configure --prefix=$HOME/git
make && make install

Next, ensure that ~/bin is first on the PATH for both login and non-login shells:

echo 'export PATH=$HOME/git/bin:$PATH' >> .bashrc

And log out and back in again.

Cloning the git-subtree source repository

You can clone the git-subtree repository using the following command:

git clone https://github.com/apenwarr/git-subtree.git

Copying the file 'git-subtree.sh' into your git scripts directory

Since git is now installed in ~/git, just:

cd git-subtree
cp git-subtree.sh $HOME/git/bin

Hope that helps!

link

answered 14 Jul '11, 19:54

ryans's gravatar image

ryans ♦♦
3.8k1932
accept rate: 44%

edited 14 Jul '11, 19:55

That totally worked! Thanks very much!

(14 Jul '11, 20:29) nitefloat nitefloat's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×91
×85
×2

Asked: 14 Jul '11, 19:26

Seen: 3,289 times

Last updated: 14 Jul '11, 20:29

Plans & prices    Sign up    Why WebFaction?    Contact us    Affiliate program    Support    Legal    Jobs    Blog    Control panel login
Powered by OSQA
© Copyright 2003-2012 Swarma Limited - WebFaction is a service of Swarma Limited