[Ubuntu Wiki] Update of "Kernel/Dev/HowtoReviewPullRequests" by brad-figg

Henrik Rydberg rydberg at euromail.se
Fri Jun 11 19:01:17 UTC 2010


Nicolas Pitre wrote:
> On Thu, 10 Jun 2010, Brad Figg wrote:
> 
>> On 06/10/2010 12:00 PM, Tim Gardner wrote:
>>> When I review a pull request it generally goes something like this:
>>>
>>> git fetch git://kernel.ubuntu.com/bradf/ubuntu-lucid-wiki lp666xxx
>>> git log -p HEAD..FETCH_HEAD
>>>
>>> If I like what I see I either cherry-pick the chosen commits, or in
>>> simple cases 'git reset --hard FETCH_HEAD', then push.
> 
> I'd really recommend _not_ doing this.  Using "git reset --hard" isn't 
> something you should be using lightly.

Hello, I am really just a bystander regarding this, but as someone using git
daily, perhaps a second voice might be of use, anyways.

There is nothing wrong with using git reset --hard. In my experience, git forces
you to know what you are doing, which IMHO is a good thing. Compared to the
alternative, which could for instance be fuzzy merges, which puts your local
tree somewhere in in limbo between the origin and what you would like it to be,
using reset --hard gives you control. You know _exactly_ what sha1 applies to
your tree.

In my mind, the "git pull" command was a mistake, since most contributors would
ever only want to do "git fetch" follows by "git rebase", to avoid those weird
merges.

Henrik





More information about the kernel-team mailing list