Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-dev] ptp-dev Digest, Vol 95, Issue 65

Beth, here's what I typically do when working with Git and creating local branches & such for new features or bug fixes, etc.

Note that I usually do this from the command-line so I'm not 100% sure what the Eclipse corresponding options / workflow would be exactly.

1. Check out the branch to which I want to make a change, which is usually the master branch.
2. Create a new branch using "git checkout -b new_local_branch"
3. Let's say I make a couple of changes and commit those changes to new_local_branch
4. I notice the master branch has some new commits and I'd like to have those in new_local_branch so I use "git stash" to temp store any un-committed changes
5. I switch to the master branch and issue "git pull" to update my local master branch
6. Then I switch back to new_local_branch, and issue the command "git rebase master" which will update new_local_branch with the commits from master
7. Then I re-apply my as-yet-uncommitted changes using "git stash pop" and resolve any merge conflicts
8. After I'm done with all of the commits in new_local_branch I can switch to the master branch and then "git merge new_local_branch" and resolve any merge conflicts that crop up

I think this might be the manual workflow for setting the pull strategy to rebase, but I'm not totally sure.

If you haven't already read through them I'd suggest reading through these pages specifically, or the "Branching" chapter as a whole.

http://git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging
http://git-scm.com/book/en/Git-Branching-Branching-Workflows
http://git-scm.com/book/en/Git-Branching-Rebasing

Not sure what other people like to do, just thought I'd throw in my $.02

Thanks,
Louis


Message: 2
Date: Wed, 20 Feb 2013 14:58:59 -0500
From: Beth Tibbitts <tibbitts@xxxxxxxxxx>
To: ptp-dev@xxxxxxxxxxx
Subject: Re: [ptp-dev] Git PTP project recommendations, rebase etc.
Message-ID:
        <OFAB69E45F.55B5131D-ON85257B18.006CA934-85257B18.006DC5FD@xxxxxxxxxx>
Content-Type: text/plain; charset="us-ascii"



Was this discussed in the ptp-dev meeting last week?
(see previous posts on this thread)

Git still mysteriously misbehaves for me, and i want to make a branch to do
some code changes and am not at ALL trusting that this is not going to make
a big mess
when we haven't even agreed on what the developer setup should be on the
page at
http://wiki.eclipse.org/PTP/environment_setup_70#Checking_out_PTP_projects

I have not changed my initial setup from the above wiki page. I'm working
in master (ptp 7.0 kepler work)
project>Team>Switch To>New Branch...  can someone please advise 'Source
Ref' and pull strategy to use?
And then what i do to merge in changes from elsewhere while i'm working and
how to commit/merge with master branch when i'm ready?

All of the docs I've read spend too much time telling me how wonderful git
is and not enough time just telling me HOW to do something.
Perhaps there are enough different ways to do it that the suggested
workflows depend on how each project uses git by convention.
If so then if i can document it, perhaps i will be more comfortable with
it.


...Beth

Beth Tibbitts
Eclipse Parallel Tools Platform  http://eclipse.org/ptp
IBM STG - High Performance Computing Tools
Mailing Address:  IBM Corp., 745 West New Circle Road, Lexington, KY 40511
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://dev.eclipse.org/mailman/private/ptp-dev/attachments/20130220/c662b75a/attachment.html>

Back to the top