Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-dev] Git and patches



On Wed, Nov 30, 2011 at 1:19 PM, Jeffrey Overbey <jeffreyoverbey@xxxxxxx> wrote:
Git continues to make me feel like a moron.  I apparently don't know how to make a patch.

I have made two commits to my local Git repository since I cloned the PTP repo; the second commit depends on the first.  When I made the second commit, I didn't check the "amend previous commit" box as recommended in http://wiki.eclipse.org/CDT/git#Posting_patches_on_Bugzilla

Now, I would like to create a patch that can be applied to PTP HEAD (or origin/master or whatever it's called now).  It needs to include the changes from both commits.

Is there an easy way to do this -- to create a Bugzilla-worthy patch with the differences between my master branch and origin/master?
I think Egit is missing that functionality to do this directly. You have two options:
1) use the command line: git diff --no-prefix origin/master > patch.file  
If not, can I at least merge the two commits, or otherwise go back in time and decide to check the "amend previous commit" checkbox?
2) In the Team View, right click the previous commit, Team->Reset->Mixed. Now you can amend and than create the patch in Eclipse.

Roland
 

Jeff



--
ORNL/UT Center for Molecular Biophysics cmb.ornl.gov
865-241-1537, ORNL PO BOX 2008 MS6309

Back to the top