< bitcoin-git>
[bitcoin] aaron-hanson opened pull request #11765: [REST] added blockhash api, tests and documentation (master...rest-blockhash-endpoint) https://github.com/bitcoin/bitcoin/pull/11765
< Lauda>
I did [insertUselessPapers]
< Lauda>
oops
< archaeal>
when adding commits to an open pull request, is the convention to squash them and force push, or keep them separate? I noticed the contributing readme mentions squashing before a merge to master, but I'm wondering about before that?
< promag>
archaeal: usually it depends
< promag>
if you already have reviews, maybe push a new commit
< archaeal>
makes sense... thanks!
< promag>
also, see git commit --fixup
< promag>
it helps later when squashing if your PR has multiple commits and multiple fixups
< promag>
usually I do git remote update origin && git rebase with origin/master when squashing
< promag>
git rebase -i --autosquash origin/master
< archaeal>
yeah i generally use fixup when squashing
< sipa>
also, even if you squash, avoid rebasing until necessary
< archaeal>
ok thanks
< sipa>
it helps review if people can look at the diff between your new pr overall and the old version, without it being cluttered with changes from master
< archaeal>
ah yes
< sipa>
for simple PRs i generally don't care about squashing liberally
< promag>
sipa: how do you diff with old version?
< sipa>
git diff <commit> <commit>
< promag>
how do you know the 1st commit?
< promag>
especially in the case I push -f
< meshcollider>
promag: you have to have checked out the branch locally first I think?
< sipa>
promag: it's the one you acked before
< meshcollider>
GitHub doesn't store commits which were overwritten with -f does it
< sipa>
not for long, but you can easily pull them locally
< sipa>
by adding the pulls branch to your remote
< sipa>
that way you always have all commits locally from all prs
< promag>
but I have to remote update all remotes right?
< sipa>
i always use git fetch -a
< wxss>
sipa, do you mean git fetch --all? Does that do the same as git remote update?
< sipa>
-a is the same as --all
< wxss>
git help fetch says -a is --append
< sipa>
heh!
< sipa>
you're right
< sipa>
git remote update seems to do the same
< wxss>
i can die happy now! yeah fetch --all and remote update seem to do the same afaict
< sipa>
apparently the difference is that remote update skips remotes that have a skipDefaultUpdate option set
< wxss>
right, remote update is configurable with groups and skipDefault, where fetch --all isn't