[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [e4-dev] Git best practices

Hi Joseph,

As outline here an initial advice is to branch often. In git (unlike CVCSs) you branch 'like a boss' (branching on the big platform.ui takes less than a second). 

-Keep your master clean and when you have to start on bug 12345 branch from master to a branch called bug12345. -
-After you work on it, go to the staging view in the Git perspective and take the changes you want from unstaged to staged and commit. 
-Take the diff and prepare the patch. 

In the case you have to patch the patch I would suggest (there might be a better way) to 
-switch back to master, 
-branch to bug 12345v2, 
-apply first patch (the one from branch bug12345), 
-modify things, stage the unstaged, commit
-get the diff to prepare a second patch. 

Then back to master. This way you keep your master clean. Also don't forget to pull master before any branching because things might have changed in the mean time.


On Wed, Jul 25, 2012 at 3:46 PM, Joseph D Carroll Jr <jdsalingerjr@xxxxxxxxx> wrote:
After working on my first patch [1], I ran into several difficulties creating a useful patch.  If I just committed and selected the commit from the history view, it would create a patch with my changes but it would also include many other changes.  I am assuming they are the changes from the previous commit as well, and I have triple checked to make sure I selected the right commit.  Also, after committing something I might realize a defect and have to commit the changes, but I will have to revert the previous commit because I am not able to select multiple commits to create a patch.

So I am assuming there are a number of things I am doing wrong.  Does anyone have any "best practices" or advice for a guy just starting with git & e4 development?



ps-  I have the EGit user guide and I reference that as much as possible. [2]

[1] http://bugs.eclipse.org/bugs/show_bug.cgi?id=385414
[2] http://wiki.eclipse.org/EGit/User_Guide

e4-dev mailing list