Re: [git-users] git pull origin branch

2011-08-21 Thread PJ Weisberg
On Sunday, August 21, 2011, Mark Liversedge  wrote:
> Hi,
> Dumb question. I'm working on a branch locally that is also over at
github. I fetch the latest from github with:
> Make sure I'm clean
> $ git checkout branch
> $ git reset --hard origin/branch
> $ git pull origin branch
> Make changes and commit then
> $ git push origin branch
> But when I pull other folks commits I get a merge commit and that gets
pushed up to github.
> I've come to the conclusion that my pull/push commands are flawed and I
should do this differently.
> How *should* I be doing this?
> TIA,
> Mark

There's nothing necessarily wrong with merge commits, but if you want to
straighten out your history before you push:

$ git fetch origin
$ git rebase origin/branch

If you had to resolve any conflicts in the merge commits, you'll have to do
that again during the rebase.

-- 

-PJ

-- 
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-users@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] git pull origin branch

2011-08-21 Thread Mark Liversedge
Hi,

Dumb question. I'm working on a branch locally that is also over at github. 
I fetch the latest from github with:

Make sure I'm clean
$ git checkout branch
$ git reset --hard origin/branch
$ git pull origin branch

Make changes and commit then
$ git push origin branch

But when I pull other folks commits I get a merge commit and that gets 
pushed up to github.

I've come to the conclusion that my pull/push commands are flawed and I 
should do this differently.

How *should* I be doing this?

TIA,
Mark

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/git-users/-/ys8A2YbcfpoJ.
To post to this group, send email to git-users@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] How to define commit policy

2011-08-21 Thread Phlip
Pankaj Gupta wrote:

> When user commit in git repo. we would like certain checks to be done.
> How can that be achieved.

I never use git raw; I always wrap it with fabric.

So fab pull trivially calls git pull, but fab ci:'comment' calls all
our unit tests, then only calls git commit -am'message' if all the
tests pass.

(You do HAVE unit tests, don't you?;)

-- 
  Phlip
  http://c2.com/cgi/wiki?ZeekLand

-- 
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-users@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.