• Wincent
    Open
  • Blog
  • Wiki
  • Snippets
  • Tags
  • Search

Git subtree mergeEdit

Created 11/8/2011, updated 9/21/2020

Given other remote $OTHER and repo $REPO:

$ git remote add -f $OTHER $REPO
$ git merge -s ours --allow-unrelated-histories --no-commit $OTHER/master
$ git read-tree --prefix=$OTHER -u $OTHER/master
$ git commit -m "Merge $OTHER code into $OTHER directory"

See also

  • http://www.kernel.org/pub/software/scm/git/docs/howto/using-merge-subtree.html
  • git
  • wiki
Site
  • About
  • Blog
  • Wiki
  • Snippets
  • Tags
  • Search
External
  • GitHub
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
Colophon

Made by Greg Hurrell using React, Relay and GraphQL (with help from Git, Redis and Neovim).