Re: [git-users] git rebase after a pull

2013-09-21 Thread Felipe Contreras
On Sat, Sep 21, 2013 at 8:06 AM, dexter ietf  wrote:
> is it required to do a git pull before doing a git push.
> and is it required to do a git rebase after git pull just
> before git push. one of my git repo mandates the
> above wondering if there is a valid reason for this.

Only if your local changes have diverged. You have to either merge or rebase.

'git pull' by default does a merge, but you can force it to do a
rebase: 'git pull --rebase'.

-- 
Felipe Contreras

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [git-users] git rebase after a pull

2013-09-21 Thread Philip Oakley
Dexter,

It is not required that you "Pull" before a push. The pull is a combination of 
'fetch' and 'merge'. So you can fetch the remote content into it's own area of 
storage, and then compare what you have with what they have - "gitk  &" 
is useful here. (the '&' means return immediately, so you can still use your 
bash while interacting with the Gitk gui, perhaps running another gitk, or git 
gui etc)

Often (in some cases) you will want to simply update their head pointers, and 
then rebase your work on their new head. Howver individual uses vary

I either use the 'git push . ref:ref" for branches I'm not on, or "git reset 
--hard @{upstream}" to move the current branch to match it's remote (I will 
have created a branch for my work so I'm not 'loosing' that).


Philip

  - Original Message - 
  From: dexter ietf 
  To: git-users@googlegroups.com 
  Sent: Saturday, September 21, 2013 2:06 PM
  Subject: [git-users] git rebase after a pull


  is it required to do a git pull before doing a git push.
  and is it required to do a git rebase after git pull just
  before git push. one of my git repo mandates the 
  above wondering if there is a valid reason for this.


  -dexter

  -- 
  You received this message because you are subscribed to the Google Groups 
"Git for human beings" group.
  To unsubscribe from this group and stop receiving emails from it, send an 
email to git-users+unsubscr...@googlegroups.com.
  For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[git-users] git rebase after a pull

2013-09-21 Thread dexter ietf
is it required to do a git pull before doing a git push.
and is it required to do a git rebase after git pull just
before git push. one of my git repo mandates the 
above wondering if there is a valid reason for this.

-dexter

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.