Skip to main content

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

Link was pasted from wrong tab. Right link:  http://wiki.eclipse.org/EGit/Git_For_Eclipse_Users#Changesets_and_branches 

On Wed, Jul 25, 2012 at 4:14 PM, Sopot Çela <sopotcela@xxxxxxxxx> wrote:
Hi Joseph,

As outline here http://127.0.0.1:56977/help/index.jsp?topic=%2Forg.eclipse.egit.doc%2Fhelp%2FEGit%2FGit_For_Eclipse_Users%2FGit-For-Eclipse-Users.html&cp=5_4_3&anchor=Changesets_and_branches 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.

Sopot

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?

Thanks,

JD

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





_______________________________________________
e4-dev mailing list
e4-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/e4-dev




Back to the top