Skip to content

Instantly share code, notes, and snippets.

@hiraiva
Created July 14, 2014 03:58
Show Gist options
  • Save hiraiva/f2214404d3a5e99bc248 to your computer and use it in GitHub Desktop.
Save hiraiva/f2214404d3a5e99bc248 to your computer and use it in GitHub Desktop.
export REPO="myrepo"
export SRC="my_src_branch"
export DST="my_dst_branch"
git checkout -b $REPO $REPO/$SRC
git filter-branch -f --tree-filter "mkdir $REPO && git mv -k ./* $REPO/"
git checkout $DST
git merge $REPO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment