Skip to content

Instantly share code, notes, and snippets.

@choonkeat
Created November 19, 2008 02:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save choonkeat/26394 to your computer and use it in GitHub Desktop.
Save choonkeat/26394 to your computer and use it in GitHub Desktop.
add-gitproj-as-rails-plugin
#!/bin/bash
PROJECT=$1
GITPATH=$2
if test -z "$PROJECT" || test -z "$GITPATH"
then
echo Usage: $0 project gitpath
exit 1
fi
git remote add -f $PROJECT $GITPATH
git merge -s ours --no-commit $PROJECT/master
git read-tree --prefix=vendor/plugins/$PROJECT -u $PROJECT/master
git commit -m "Merge $PROJECT"
git pull -s subtree $PROJECT master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment