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

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


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!

permanent link

answered 14 Jul '11, 19:54

ryans's gravatar image

ryans ♦♦
accept rate: 42%

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



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

Question tags:


question asked: 14 Jul '11, 19:26

question was seen: 6,760 times

last updated: 14 Jul '11, 20:29

Features & prices    Sign up    Contact us    Affiliate program    Support    Legal    Jobs    Blog    Control panel login
© Copyright 2003-2015 Swarma Limited - WebFaction is a service of Swarma Limited