Script tested by replacing `Bitcoin-ABC/secp256k1.git` with `PiRK/secp256k1.git` and rewritting the history of the remote repo as described above.
Commit extra changes to some cmake/* file or src/secp256k1/* file, commit some unrelated changes to only unrelated files, and rerun the script to check that it adds the proper commits as expected.
```
pierre@simak:~/dev/test4/bitcoin-abc$ contrib/extract-secp256k1.sh
...
Completely finished after 1.47 seconds.
From github.com:PiRK/secp256k1
* branch master -> FETCH_HEAD
* [new branch] master -> github/master
Current branch master is up to date.
pierre@simak:~/dev/test4/bitcoin-abc$ cd secp256k1/
pierre@simak:~/dev/test4/bitcoin-abc/secp256k1$ git log --pretty=oneline
6fda76d425667ffb22799695d60eea82968ef24b (HEAD -> master) touching stuff in src/secp256k1 and electrum/
2441b09fc64af747fef844430e9802f94906c5ce spamming cmake/FindJemalloc
3879721c67a95f29a45c4fedd65b556a0a1f0541 [cmake] move make_link function to a new MakeLink module
b85a96a724edcdce51f70f4d2b82d2202d902d59 (tag: v0.27.8, github/master) guix: use proper compiler in cmake toolchain
...
```