Skip to content

Instantly share code, notes, and snippets.

@clayhinson
Created March 17, 2011 18:37
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clayhinson/874869 to your computer and use it in GitHub Desktop.
Save clayhinson/874869 to your computer and use it in GitHub Desktop.
updates frapi core while preserving a symlink to a self-managed custom/ folder
#!/bin/bash
#assumes working copy is a fork & upstream is set to git@github.com:frapi/frapi.git
# temporarily move custom symlink
mv src/frapi/custom src/frapi/custom_symlink &&
# reset any changes (i.e. deletion of custom folder)
git reset --hard &&
# fetch the upstream HEAD
git fetch upstream &&
# merge in upstream
git merge upstream/master &&
# move the custom/ folder
mv src/frapi/custom src/frapi/custom_bak
# restore the original symlink
mv src/frapi/custom_symlink src/frapi/custom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment