Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

can i merge two repositories github

$ cp -R my-plugin my-plugin-dirty
$ cd my-plugin-dirty
$ git filter-branch -f --tree-filter "zsh -c 'setopt extended_glob && setopt glob_dots && mkdir -p plugins/my-plugin && (mv ^(.git|plugins) plugins/my-plugin || true)'" -- --all
$ cd ../main-project
$ git checkout master
$ git remote add --fetch my-plugin ../my-plugin-dirty
$ git merge my-plugin/master --allow-unrelated-histories
$ cd ..
cd ..
$ rm -rf my-plugin-dirty
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #merge #repositories #github
ADD COMMENT
Topic
Name
2+2 =