On Friday 16 April 2010 11:31:18 Rick DeNatale wrote:
> On Thu, Apr 15, 2010 at 6:45 PM, Charles Manning
>
> <[email protected]> wrote:
> > On Friday 16 April 2010 01:15:42 Rick DeNatale wrote:
> >> On Thu, Apr 15, 2010 at 12:59 AM, Charles Manning
> >>
> >> <[email protected]> wrote:
> >> > Hi All
> >> >
> >> > I have an issue that I think I can resolve in a messy way, but I
> >> > suspect there has to be a cleaner way to do this too.
> >> >
> >> > On one computer I have master, plus a branch with some work on it.
> >> > Let's call that branch B.
> >> >
> >> > On a different computer I made a change and pushed that to the shared
> >> > repository.
> >> >
> >> > Now I want to go back to the first computer, pull the changes so that
> >> > master reflects the current shared repository. That would put master
> >> > ahead of the branch point, but I want to have those changes viewed in
> >> > branch B too.
> >> >
> >> > Ideally there would be some way to rip a branch off and re-graft it on
> >> > to a different branch point.
> >> >
> >> > It seems I could do something like
> >> >
> >> > -- Starting on branch B --
> >> > git commit -m "B work in progress"
> >> > git checkout master
> >> > git pull
> >> > git branch B-continued
> >> > git checkout B-continued
> >> > git merge B
> >> > git branch -d B
> >> > -- Continue working on B-continued--
> >>
> >> If I understand what you are asking I think it's just
> >>
> >> - Starting on Branch B
> >> git commit -m'B work in progress'
> >> git checkout master
> >> git pull
> >> git checkout B
> >> git merge master
> >> -- continue working on B
> >
> > I did some reading last night. It looks like the following would do what
> > I want:
> > -starting on B -
> > git commit -m "B work in progress"
> > git checkout master
> > git pull
> > git checkout B
> > git rebase master B
>
> Be careful, you don't want to rebase a branch which you have already
> pushed, or it will wreak havoc for other users.
>
> If you HAVE pushed branch be then you should merge master into it to
> pick up changes from master instead of rebasing it.

Thanks for that warning,

The branch has not been pushed. It is just a private branch.

My intention is to always merge stuff onto master before pushing master. That 
should keep things a lot neater.

Thanks

-- CHarles

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.

Reply via email to