Skip to content

Instantly share code, notes, and snippets.

@leonardaustin
Last active August 16, 2016 13:22
Show Gist options
  • Save leonardaustin/3c7ed98bdb128f867081170c20b85b08 to your computer and use it in GitHub Desktop.
Save leonardaustin/3c7ed98bdb128f867081170c20b85b08 to your computer and use it in GitHub Desktop.
/tmp/core $ git reset --hard HEAD~
HEAD is now at 18fe403 Merging foo to master
/tmp/core $ git merge -m 'merge foo/master into master (with subtree)' -X subtre ^Me=foo foo/master
Merge made by the 'recursive' strategy.
foo/monde | 1 +
1 file changed, 1 insertion(+)
create mode 100644 foo/monde
/tmp/core $ ls -F1
foo/
scalarelational/
zero/
µ/
/tmp/core $ ls -F1 foo/*
foo/monde
foo/world
/tmp/core $ gitlog | head
* 20991c9 merge foo/master into master (with subtree) (HEAD -> master) (Hraban Luyat, 0 seconds ago)
|\
| * bddded4 fake-repo commit #2 (add file monde) (foo/master) (Hraban Luyat, 2 seconds ago)
* | 18fe403 Merging foo to master (Hraban Luyat, 2 seconds ago)
|\ \
| |/
| * e74125e initial commit in fake-repo (add file world) (Hraban Luyat, 2 seconds ago)
* 4a21d29 Merging µ to master (Hraban Luyat, 2 seconds ago)
|\
| * 0f0a833 .attr() now uses setAttribute() and getAttribute to make it work with data- attributes (µ/master) (Koen Mostert, 1 year, 3 months ago)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment