Here is the repository I am looking to use - https://github.com/Sumi-Interactive/SIAlertView
What is the best way to clone this GitHub repository and merge all of the 36 open pull requests on that repository into the one I have just cloned?
This would kind of achieve what you want. Clone the remote, configure fetching of pull requests and then merge each of the PR branches.
However, there are conflicts between the branches. They are changing the same files in different ways. So merging all of them together is not a trivial task. And thus the script fails.
#!/usr/bin/env bash
set -e
git clone https://github.com/Sumi-Interactive/SIAlertView
cd SIAlertView
git config --add remote.origin.fetch "+refs/pull/*/head:refs/remotes/origin/pr/*"
git fetch
for branch in $(git branch -r); do
[[ $branch =~ origin/pr/ ]] && git merge $branch
done
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With