github / git workflow tips to get clean pull requests

46 views
Skip to first unread message

Tim Richardson

unread,
Jun 3, 2013, 9:21:50 PM6/3/13
to web2py-d...@googlegroups.com
This is pretty funny, me giving git tips. But anyway ...
I have forked the book reposistory on git hub and have a local repository. I've set up the mdipierro repository as a remote called upstream.
I've made a bit of a mess of it and kept getting commits in my pull requests that I didn't want. Then I stumbled across a stackoverflow tip which has made my git experience much smoother. This might help others. It lets you cherry pick the commits you want and leave behind anything else (or you can follow these steps before making changes).

When wanting to make a change called "CHANGE1" do this (which works with a branch called CHANGE1)


1. git checkout -b CHANGE1 upstream/master
2. ... Make changes or cherry pick from another local branch. commit if necessary
3. git push origin CHANGE1

and now go the github website, change to the new branch and do a pull request. GitHub even has a "delete branch" button after your pull request is merged.

Niphlod

unread,
Jun 4, 2013, 4:34:34 PM6/4/13
to
yep, that's pretty much all I said in https://groups.google.com/d/msg/web2py-developers/QohaF1JITiA/nfVALd96DTMJ

PS @mcm: adopt this behaviour too before sending PR ..... otherwise ....




^_^

Michele Comitini

unread,
Jun 5, 2013, 4:40:28 AM6/5/13
to web2py-developers
:O

I will :)


2013/6/4 Niphlod <nip...@gmail.com>
yep, that's pretty much all I said in https://groups.google.com/d/msg/web2py-developers/QohaF1JITiA/nfVALd96DTMJ

PS @mcm: adopt this behaviour too before sending PR ..... otherwise ....



^_^

--
-- mail from:GoogleGroups "web2py-developers" mailing list
make speech: web2py-d...@googlegroups.com
unsubscribe: web2py-develop...@googlegroups.com
details : http://groups.google.com/group/web2py-developers
the project: http://code.google.com/p/web2py/
official : http://www.web2py.com/
---
You received this message because you are subscribed to the Google Groups "web2py-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py-develop...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages