Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Merging two GitHub repositories without losing commit history (hacks.mozilla.org)
3 points by feross on Aug 29, 2022 | hide | past | favorite | 1 comment


Not trying to be all negative, but I really dislike this format. No mention of `--help` or `man`?. The thing is pages long with a TON of superfluous steps and doesn't even mention the merge flag until you're 3/4's of the way through the post. Plus the way the author went about moving the folders into a subdir is odd to say the least

IMO posts like this are why git gets a bad wrap for being overly complicated.

This sort of thing lends itself to the SO, not a long winded blog post.

    cd my_repo
    mkdir -p subdir/test
    git mv * subdir/test 
    git commit -m foob
    git push origin master
    popd
    
    
    cd my_other repo
    git remote add foo ssh://my_repo
    git fetch foo
    git merge foo/master --allow-unrelated-histories




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: