Skip to content

Instantly share code, notes, and snippets.

@fjahr
Last active August 21, 2019 19:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fjahr/ce1984dff58756c5d637cdfebd96bc29 to your computer and use it in GitHub Desktop.
Save fjahr/ce1984dff58756c5d637cdfebd96bc29 to your computer and use it in GitHub Desktop.
Bitcoin Git Ops

Maintaining your fork

Syncing your fork

old notes:

Git commands

check out pull request as local branch: git fetch origin pull/15169/head:2018-12-parallel-mempool-scriptcheck

diff for just one specific commit: git diff COMMIT~ COMMIT

git blame on deleted file: git log -S path/to/file

check out from fork: $ git fetch : $ git checkout

git remote add sipa https://github.com/sipa/bitcoin/ git fetch sipa gco -b muhash sipa/muhash git push origin muhash git rebase master

SWITCHING SUBTREE If you used git subtree (and not git submodule) to create the subtree, then it's just a normal dir. To switch it to another branch, just delete it and recreate the subtree from the new branch. This is: git rm git commit git subtree add --prefix= <repository_url>

pull update for subtree git subtree pull --prefix src/secp256k1 secp_fab ecmh --squash

update subtree rm -r src/secp256k1/ gaa com 'Remove original secp256k1' git subtree add --prefix src/secp256k1/ https://github.com/fjahr/secp256k1/ ecmh

cherry pick a commit from a different pr git fetch upstream pull/14053/head:add-address-index git cherry-pick specific commit hash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment