No description provided.
Add git and github tips and tricks to developer notes #8178
pull sipa wants to merge 1 commits into bitcoin:master from sipa:docgit changing 1 files +48 −0-
sipa commented at 11:06 PM on June 8, 2016: member
-
btcdrak commented at 11:16 PM on June 8, 2016: contributor
Nice advice!
utACK a70df2d
-
in doc/developer-notes.md:None in a70df2d6de outdated
438 | + This will add a an `upstream-pull` remote to your git repository, which can be fetched using `git fetch --all` 439 | + or `git fetch upstream-pull`. Afterwards, you can use `upstream-pull/NUMBER/head` in arguments to `git show`, 440 | + `git checkout` and anywhere a commit id would be acceptable to see the changes from that commit. 441 | + 442 | +- To verify whether two commits result in the exact same tree, you can find out what their *tree id* is using 443 | + `git show -s --format="%T" commit` for each, and then compare the tree ids.
luke-jr commented at 11:17 PM on June 8, 2016:Why not just
git diff commit..commit?
sipa commented at 1:20 PM on June 9, 2016:I assume that works as well, but it seems less certain. If the tree hash is identical, the resulting code necessarily is.
MarcoFalke commented at 1:24 PM on June 9, 2016:I am usually using what @luke-jr suggest, as the additional step to determine the tree id is not needed. If there is no difference between two commits, the tree id should be identical as well.
luke-jr commented at 11:18 PM on June 8, 2016: memberMaybe add that
git worktreeor whatever you suggested the other day?laanwj commented at 5:19 AM on June 9, 2016: memberACK
Maybe add that git worktree or whatever you suggested the other day?
Can be added later, no need to do everything in this pull. There's also a lot of git commands in the wild that are too old to support it, such as the one in Ubuntu 14.04.
laanwj added the label Docs and Output on Jun 9, 2016fanquake commented at 6:28 AM on June 9, 2016: memberACK a70df2d
jonasschnelli commented at 7:00 AM on June 9, 2016: contributorACK a70df2d6decfb56cfc07aed361bcfe0076766f4b
in doc/developer-notes.md:None in a70df2d6de outdated
409 | + 410 | + This may make it much clearer what caused the conflict. In this style, you can often just look 411 | + at what changed between *original* and *theirs*, and mechnically apply that to *yours* (or the other way around). 412 | + 413 | +``` 414 | +git config merge.conflictstyle diff3`
paveljanik commented at 7:20 AM on June 9, 2016:The back-tick at the end of the command should probably be removed.
sipa commented at 1:23 PM on June 9, 2016:Inlined it into the first sentence instead.
in doc/developer-notes.md:None in a70df2d6de outdated
433 | +[remote "upstream-pull"] 434 | + fetch = +refs/pull/*:refs/remotes/upstream-pull/* 435 | + url = git@github.com:bitcoin/bitcoin.git 436 | +``` 437 | + 438 | + This will add a an `upstream-pull` remote to your git repository, which can be fetched using `git fetch --all`
paveljanik commented at 7:22 AM on June 9, 2016:"a an"
sipa commented at 1:23 PM on June 9, 2016:Fixed.
paveljanik commented at 7:23 AM on June 9, 2016: contributorThis is very useful! Thanks!
MarcoFalke commented at 11:25 AM on June 9, 2016: memberConcept ACK, but needs the tiny nits fixed.
sipa force-pushed on Jun 9, 2016sipa force-pushed on Jun 9, 2016sipa commented at 1:31 PM on June 9, 2016: member@MarcoFalke Ok, removed it. The alternative you're using is too trivial to list.
sipa force-pushed on Jun 9, 2016sipa force-pushed on Jun 9, 2016Add git and github tips and tricks to developer notes 31444491f2in doc/developer-notes.md:None in ac66b2381c outdated
403 | + === 404 | + theirs 405 | + >>> 406 | + 407 | + This may make it much clearer what caused the conflict. In this style, you can often just look 408 | + at what changed between *original* and *theirs*, and mechnically apply that to *yours* (or the other way around).
paveljanik commented at 1:43 PM on June 9, 2016:mechanically
sipa commented at 1:45 PM on June 9, 2016:Thanks, fixed!
sipa force-pushed on Jun 9, 2016paveljanik commented at 1:45 PM on June 9, 2016: contributorlaanwj merged this on Jun 9, 2016laanwj closed this on Jun 9, 2016laanwj referenced this in commit f7b1bfc9a3 on Jun 9, 2016in doc/developer-notes.md:None in 31444491f2
420 | + even work when combined with the `-w` or `--word-diff` options described above. 421 | + 422 | +- When looking at other's pull requests, it may make sense to add the following section to your `.git/config` 423 | + file: 424 | + 425 | + [remote "upstream-pull"]
MarcoFalke commented at 11:06 AM on June 21, 2016:nit: Please use 4 spaces (not 6)
codablock referenced this in commit f82ddbea1b on Sep 16, 2017codablock referenced this in commit c81e6dd528 on Sep 19, 2017codablock referenced this in commit 209a4d63bd on Dec 22, 2017andvgal referenced this in commit 5385726382 on Jan 6, 2019DrahtBot locked this on Sep 8, 2021Labels
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-19 09:15 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me