Ethers.js: Seeking Help: Best way to git merge for v5 release

Created on 29 May 2020  路  3Comments  路  Source: ethers-io/ethers.js

The git repo for v5 was created using the --orphan option for git.

Last time I did this was for the v3 to v4 release, since many things changed, and by moving to a mono-repo a similar case came up.

I'd love feedback on the best ways to perform a merge that does not impact the history of the repo, but still makes the ethers-v5-beta branch the new master.

Thanks! (pinging @evertonfraga who had some ideas ;))

discussion

All 3 comments

So, I've experimented locally and it looks like the following will allow a pleasant merge with both histories, any feedback is welcome though:

# Create a legacy branch for security/maintenance updates for v4
git checkout master
git checkout -b v4-legacy

# Merge v5 history into master
git checkout ethers-v5-beta
git merge --allow-unrelated-histories -s ours master
git checkout master
git merge ethers-v5-beta

I took exactly that strategy to manually import other repos (with their histories) to a monorepo structure.

https://github.com/evertonfraga/monorepify-ethereumjs/blob/master/migrate-git-repo/monorepify.sh#L107-L111

It seems to have worked out great.

Thanks! :)

Was this page helpful?
0 / 5 - 0 ratings