Changeset View
Changeset View
Standalone View
Standalone View
doc/developer-notes.md
Show First 20 Lines • Show All 890 Lines • ▼ Show 20 Lines | |||||
--------------------- | --------------------- | ||||
- Github is not typically the source of truth for pull requests. See [CONTRIBUTING](../CONTRIBUTING.md) for instructions | - Github is not typically the source of truth for pull requests. See [CONTRIBUTING](../CONTRIBUTING.md) for instructions | ||||
on setting up your repo correctly. | on setting up your repo correctly. | ||||
- Similarly, your git remote origin should be set to: `ssh://vcs@reviews.bitcoinabc.org:2221/source/bitcoin-abc.git` | - Similarly, your git remote origin should be set to: `ssh://vcs@reviews.bitcoinabc.org:2221/source/bitcoin-abc.git` | ||||
instead of github.com. See [CONTRIBUTING](../CONTRIBUTING.md). | instead of github.com. See [CONTRIBUTING](../CONTRIBUTING.md). | ||||
- For resolving merge/rebase conflicts, it can be useful to enable diff3 style using | For git and GitHub productivity tips, see [Productivity Notes](productivity.md). | ||||
`git config merge.conflictstyle diff3`. Instead of | |||||
<<< | |||||
yours | |||||
=== | |||||
theirs | |||||
>>> | |||||
you will see | |||||
<<< | |||||
yours | |||||
||| | |||||
original | |||||
=== | |||||
theirs | |||||
>>> | |||||
This may make it much clearer what caused the conflict. In this style, you can often just look | |||||
at what changed between *original* and *theirs*, and mechanically apply that to *yours* (or the other way around). | |||||
- When reviewing patches which change indentation in C++ files, use `git diff -w` and `git show -w`. This makes | |||||
the diff algorithm ignore whitespace changes. This feature is also available on github.com, by adding `?w=1` | |||||
at the end of any URL which shows a diff. | |||||
- When reviewing patches that change symbol names in many places, use `git diff --word-diff`. This will instead | |||||
of showing the patch as deleted/added *lines*, show deleted/added *words*. | |||||
- When reviewing patches that move code around, try using | |||||
`git diff --patience commit~:old/file.cpp commit:new/file/name.cpp`, and ignoring everything except the | |||||
moved body of code which should show up as neither `+` or `-` lines. In case it was not a pure move, this may | |||||
even work when combined with the `-w` or `--word-diff` options described above. | |||||
- When looking at other's pull requests, it may make sense to add the following section to your `.git/config` | |||||
file: | |||||
[remote "upstream-pull"] | |||||
fetch = +refs/pull/*:refs/remotes/upstream-pull/* | |||||
url = git@github.com:bitcoin/bitcoin.git | |||||
This will add an `upstream-pull` remote to your git repository, which can be fetched using `git fetch --all` | |||||
or `git fetch upstream-pull`. Afterwards, you can use `upstream-pull/NUMBER/head` in arguments to `git show`, | |||||
`git checkout` and anywhere a commit id would be acceptable to see the changes from pull request NUMBER. | |||||
Release notes | Release notes | ||||
------------- | ------------- | ||||
Release notes should be written for any PR that: | Release notes should be written for any PR that: | ||||
- introduces a notable new feature | - introduces a notable new feature | ||||
- fixes a significant bug | - fixes a significant bug | ||||
▲ Show 20 Lines • Show All 231 Lines • Show Last 20 Lines |