git-merge-repo - Man Page
Merge two repo histories
Examples (TL;DR)
- Merge a repository's branch into the current repository's directory:
git merge-repo path/to/repo branch_name path/to/directory
- Merge a remote repository's branch into the current repository's directory, not preserving history:
git merge-repo path/to/remote_repo branch_name .
Synopsis
git-merge-repo <repo> <branch> <directory> [--squash]
Description
Merges a repository´s history with the current repository, inside a specified directory.
Optional --squash flag skips the full history and generates only one commit for the merge.
Examples
Merges a local repo´s frontend branch into the current repo´s web folder:
$ git merge-repo ../app/.git frontend web
Merges a remote repo´s master branch into the current repo´s folder:
$ git merge-repo git@github.com:tj/git-extras.git master .
Author
Written by Ivan Malopinsky <hello@imsky.co>
Reporting Bugs
See Also
Referenced By
October 2017 Git Extras