[git-users] Re: change another branch

2010-09-20 Thread ruud


On Sep 16, 5:01 pm, Donovan Bray donno...@gmail.com wrote:
 Why do you do this?

 Or if you want to be really clean rebase _work_ and squeeze all of the 
 commits into a single commit then merge into master.


hi Donovan,
this is exactly what I do. But git beginner as I am, I thought that
the best way to merge it into master was using reset. I was corrected
at this point by Michel and Konstantin: git merge does the same
without using a blunt axe method as I did.

 Using a reset in a normal workflow just has smell to it.
I certainly will leave this method of working.

regards, Ruud

-- 
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 git-us...@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



[git-users] Re: change another branch

2010-09-16 Thread ruud
Hi Michael,

I forgot to mention the work branch is based on master. It is one or
more commits ahead. I only  want to move the master head to the work
head.

regards, Ruud

-- 
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 git-us...@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



[git-users] Re: change another branch

2010-09-16 Thread P Rouleau
Are you the only one to work on these branches? If not, you loose the
work other have done.

-*--*--*--*-- master
   \-*--*--*-- work

A reset --hard work with branches like above loose the 3 commits
made on master and simply make master to refer to the same commit than
work.

If you are alone, you can work directly on master if you want to save
some manual operations.
if you are not alone, you should use merge instead of reset or,
better, you should rebase your work on the new master's state, then
merge it to master.

On Sep 16, 6:57 am, ruud r.grosm...@gmail.com wrote:
 Hi Michael,

 I forgot to mention the work branch is based on master. It is one or
 more commits ahead. I only  want to move the master head to the work
 head.

 regards, Ruud

-- 
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 git-us...@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Re: change another branch

2010-09-16 Thread Michael P. Soulier
On 16/09/10 ruud said:

 Hi Michael,
 
 I forgot to mention the work branch is based on master. It is one or
 more commits ahead. I only  want to move the master head to the work
 head.

That's what merge is for. Why would you use reset?

Mike


signature.asc
Description: Digital signature


[git-users] Re: change another branch

2010-09-16 Thread Konstantin Khomoutov
On Sep 16, 3:11 pm, Michael P. Soulier msoul...@digitaltorque.ca
wrote:

 I forgot to mention the work branch is based on master. It is one or
 more commits ahead. I only  want to move the master head to the work
 head.
 That's what merge is for. Why would you use reset?

Also I should note that Git is smart about merging and in case master
did not contain any commits beyond the point work was forked off it
Git will perform the so-called fast-forwarding of the master branch
by making its tip point to the tip commit in work -- the same thing
which would result from doing `git reset --hard work`.

-- 
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 git-us...@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



[git-users] Re: change another branch

2010-09-16 Thread ruud
thanks Mike and Konstantin,

this was exactly what I needed to hear. I only wanted a fast forward.

But as you say, that is what git merge does. A step forward on my git
path.
As I reply, the sun starts to shine and lights the complete room. Who
said that coincidence doesn't exist?

regards, Ruud

-- 
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 git-us...@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.