Skip to content

Instantly share code, notes, and snippets.

@scorpp
Last active December 19, 2015 09:39
Show Gist options
  • Save scorpp/5934641 to your computer and use it in GitHub Desktop.
Save scorpp/5934641 to your computer and use it in GitHub Desktop.
GIT merge a subdirectory from another repo\branch
# http://stackoverflow.com/a/12048161/679052
$ git remote add Bar /path/to/bar
$ git merge -s ours --no-commit Bar/master
$ git read-tree --prefix=public/bar -u Bar/master:www/tools/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment