Hi all,
I'm doing some experiment to understand the best way to manage PR (sorry 
for the long email).
First: I like to do rebase, long running branch make the history graph 
hard to understand (I also like to squash micro commit when done by the 
same author).
Second: I dislike to see a PR marked by github only as closed when it is 
really merged (probably github could provide in a near future statistics 
about the nr of pull requests and the % of acceptance). This mean also 
that close a PR to make a new rebased PR is not a best practice for me.

So for the pull request 241 I have done the following from my command line
> $ git remote -v
> bram    https://github.com/bram-atmire/DSpace (fetch)
> bram    https://github.com/bram-atmire/DSpace (push)
> dspace  https://github.com/DSpace/DSpace (fetch)
> dspace  https://github.com/DSpace/DSpace (push)
> kevin   https://github.com/KevinVdV/DSpace (fetch)
> kevin   https://github.com/KevinVdV/DSpace (push)
> lap82   https://github.com/lap82/DSpace (fetch)
> lap82   https://github.com/lap82/DSpace (push)
> mwood   https://github.com/mwoodiupui/DSpace (fetch)
> mwood   https://github.com/mwoodiupui/DSpace (push)
> origin  https://github.com/abollini/DSpace (fetch)
> origin  ... and many other :-)

git pull dspace master
git checkout -b DS-1432
git pull kevin DS-1432
git rebase master
git checkout master
git merge -m "Merge pull request #241 rebased" --no-ff DS-1432
git push origin master
git push dspace master

in this way I get the PR 241 to automatically note my commit
https://github.com/DSpace/DSpace/pull/241#ref-commit-15ed2fb
unfortunately it refers to my repository probably due to have push first 
to my origin...

After this step the PR was still open on GitHub... but also 
automatically mergeable so I have closed it manually.
But, trying to see what could happen clicking on the git merge button I 
have made a test on my local git repository on a new branch

> $ git checkout -b test
> Switched to a new branch 'test'
>
> bollini@BOLLINI-P-NEW /e/dspace4/source/DSpace (test)
> $ git merge kevin/DS-1432
> Merge made by the 'recursive' strategy.
>
> bollini@BOLLINI-P-NEW /e/dspace4/source/DSpace (test)
> $ git diff master
>
> bollini@BOLLINI-P-NEW /e/dspace4/source/DSpace (test)
> $ git log
> commit f89802d41feab6dd23f60b0cf53fb4a7f41e5321
> Merge: 15ed2fb 74e615c
> Author: Andrea Bollini <a.boll...@cineca.it>
> Date:   Fri Sep 6 10:42:57 2013 +0200
>
>     Merge remote-tracking branch 'kevin/DS-1432' into test
>
> commit 15ed2fb52c89e7bfc1ac1bef67944d2c791f7cbf
> Merge: 90c86da b3aca64
> Author: Andrea Bollini <a.boll...@cineca.it>
> Date:   Fri Sep 6 10:36:33 2013 +0200
>
>     Merge pull request #241 rebased

IMHO this mean that if I do a fast forward merge for a rebased pull 
request and after just push the green botton of github we are able to 
achieve clean history and proper statistics for PRs?
what do you think? any tips from git/github experts?

Andrea



-- 
Andrea Bollini
Dipartimento Servizi e Soluzioni per l'Amministrazione Universitaria
Divisione Ricerca

Via dei Tizii, 6
00185 Roma, Italy
tel. +39 06 44 486 087 - mob. +39 348 82 77 525
http://www.cineca.it


------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
_______________________________________________
Dspace-devel mailing list
Dspace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-devel

Reply via email to