Bitshala / BitcoinCore-PR-Review-Club

Bitcoin Core PR Review Organising repo
10 stars 2 forks source link

Modify instructions: Easier way to clone PRs #40

Closed emjshrx closed 1 year ago

emjshrx commented 1 year ago

To clone a PR in a git repo, adding the remote everytime can be hard and wasteful. We can directly fetch the pr from origin. Reference

# do once
git config --global alias.pr '!f() { git fetch -fu ${2:-origin} refs/pull/$1/head:pr/$1 && git checkout pr/$1; }; f'

# fetch the PR
git pr 26533

https://github.com/Bitshala/Bitcoin-PR-Review-Club/blob/2c027c692744b2b922cf3c9ec085af83bf6c67de/test-pr.sh#L12

rajarshimaitra commented 1 year ago

Thanks for this.. Will add it to the suggestions..

stratospher commented 1 year ago

nice, definitely easier. done in https://github.com/bitshala/Bitcoin-PR-Review-Club/commit/3979fd7d33272b10aa53227c62475f9008b218af. i've kept you as the commit author - feel free to directly PR if you prefer next time.