git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Question regarding: git pull --no-commit origin
@ 2007-03-25 23:32 Geoff Russell
  2007-03-25 23:38 ` Shawn O. Pearce
  0 siblings, 1 reply; 5+ messages in thread
From: Geoff Russell @ 2007-03-25 23:32 UTC (permalink / raw
  To: git

Hi,

I'm using version 1.5.0.5

I do: git pull --no-commit origin

Receive messages ending in:

        ...
       Updating 6a29cdd..b7ba33d
       Fast forward
       interface/testfile |    1 +
       1 files changed, 1 insertions(+), 0 deletions(-)
       create mode 100644 interface/testfile

My working directory is correctly updated. I assume that I can make further mods
and then commit.

However when I do: git commit -a

I'm told: nothing to commit (working directory clean)

Am I misunderstanding something?

Cheers,
Geoff Russell

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Question regarding: git pull --no-commit origin
  2007-03-25 23:32 Question regarding: git pull --no-commit origin Geoff Russell
@ 2007-03-25 23:38 ` Shawn O. Pearce
  2007-03-26  1:16   ` Geoff Russell
  0 siblings, 1 reply; 5+ messages in thread
From: Shawn O. Pearce @ 2007-03-25 23:38 UTC (permalink / raw
  To: Geoff Russell; +Cc: git

Geoff Russell <geoffrey.russell@gmail.com> wrote:
> I do: git pull --no-commit origin
> 
> Receive messages ending in:
> 
>        ...
>       Updating 6a29cdd..b7ba33d
>       Fast forward
>       interface/testfile |    1 +
>       1 files changed, 1 insertions(+), 0 deletions(-)
>       create mode 100644 interface/testfile
...
> However when I do: git commit -a
> 
> I'm told: nothing to commit (working directory clean)
> 
> Am I misunderstanding something?

The pull was strictly a fast-forward.  No merge commit was necessary
to record the merge, so we didn't actually honor the --no-commit
argument.

In other words, your current branch did not contain any commits
that were not in the origin branch you were pulling from.  So
a real merge wasn't required here.

-- 
Shawn.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Question regarding: git pull --no-commit origin
  2007-03-25 23:38 ` Shawn O. Pearce
@ 2007-03-26  1:16   ` Geoff Russell
  2007-03-26  1:47     ` Jeff King
  0 siblings, 1 reply; 5+ messages in thread
From: Geoff Russell @ 2007-03-26  1:16 UTC (permalink / raw
  To: Shawn O. Pearce; +Cc: git

On 3/26/07, Shawn O. Pearce <spearce@spearce.org> wrote:
> Geoff Russell <geoffrey.russell@gmail.com> wrote:
> > I do: git pull --no-commit origin
> >
> > Receive messages ending in:
> >
> >        ...
> >       Updating 6a29cdd..b7ba33d
> >       Fast forward
> >       interface/testfile |    1 +
> >       1 files changed, 1 insertions(+), 0 deletions(-)
> >       create mode 100644 interface/testfile
> ...
> > However when I do: git commit -a
> >
> > I'm told: nothing to commit (working directory clean)
> >
> > Am I misunderstanding something?
>
> The pull was strictly a fast-forward.  No merge commit was necessary
> to record the merge, so we didn't actually honor the --no-commit
> argument.
>
> In other words, your current branch did not contain any commits
> that were not in the origin branch you were pulling from.  So
> a real merge wasn't required here.

Thanks Shawn, but my situation is I have the MASTER repository and I'm
pulling from a TEST repository. I want to double
check the updates other people have done
on the TEST repository, and if they are okay, then commit them.

If --no-commit won't let me do this then perhaps I need something like:

          git pull origin:testing
          git checkout testing
           .... test
          git checkout master ; git pull . testing

i.e., make a branch for the test changes and then merge this branch.

Cheers,
Geoff
>
> --
> Shawn.
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Question regarding: git pull --no-commit origin
  2007-03-26  1:16   ` Geoff Russell
@ 2007-03-26  1:47     ` Jeff King
  2007-03-26  2:17       ` Geoff Russell
  0 siblings, 1 reply; 5+ messages in thread
From: Jeff King @ 2007-03-26  1:47 UTC (permalink / raw
  To: Geoff Russell; +Cc: Shawn O. Pearce, git

On Mon, Mar 26, 2007 at 10:46:09AM +0930, Geoff Russell wrote:

> If --no-commit won't let me do this then perhaps I need something like:
> 
>          git pull origin:testing
>          git checkout testing
>           .... test
>          git checkout master ; git pull . testing

Close.  Remember that a pull is basically a fetch + merge; so your first
command is just the fetch:

  # fetches everything from origin
  git fetch
  # see what they have that we don't
  git whatchanged HEAD..origin/testing
  # check out their code in more detail
  git checkout origin/testing
  # or even make our own branch in case we have tweaks to make
  git checkout -b testing origin/testing
  # and once we're OK, do the merge
  git checkout master; git merge origin/testing

All of that assumes git 1.5 or greater, which uses the separate remote
layout and has some interface improvements. For older versions, their
'testing' branch will be pulled into your 'testing' branch, and I
believe you will need to 'git pull . testing' to merge it.

-Peff

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Question regarding: git pull --no-commit origin
  2007-03-26  1:47     ` Jeff King
@ 2007-03-26  2:17       ` Geoff Russell
  0 siblings, 0 replies; 5+ messages in thread
From: Geoff Russell @ 2007-03-26  2:17 UTC (permalink / raw
  To: Jeff King; +Cc: Shawn O. Pearce, git

On 3/26/07, Jeff King <peff@peff.net> wrote:
> On Mon, Mar 26, 2007 at 10:46:09AM +0930, Geoff Russell wrote:
>
> > If --no-commit won't let me do this then perhaps I need something like:
> >
> >          git pull origin:testing
> >          git checkout testing
> >           .... test
> >          git checkout master ; git pull . testing
>
> Close.  Remember that a pull is basically a fetch + merge; so your first
> command is just the fetch:
>
>   # fetches everything from origin
>   git fetch
>   # see what they have that we don't
>   git whatchanged HEAD..origin/testing
>   # check out their code in more detail
>   git checkout origin/testing
>   # or even make our own branch in case we have tweaks to make
>   git checkout -b testing origin/testing
>   # and once we're OK, do the merge
>   git checkout master; git merge origin/testing
>
> All of that assumes git 1.5 or greater, which uses the separate remote
> layout and has some interface improvements. For older versions, their
> 'testing' branch will be pulled into your 'testing' branch, and I
> believe you will need to 'git pull . testing' to merge it.
>
> -Peff
>

Ok, that's all nice and clear now. Many thanks.

Geoff.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-03-26  2:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-25 23:32 Question regarding: git pull --no-commit origin Geoff Russell
2007-03-25 23:38 ` Shawn O. Pearce
2007-03-26  1:16   ` Geoff Russell
2007-03-26  1:47     ` Jeff King
2007-03-26  2:17       ` Geoff Russell

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).