On Oct 12, 11:01 pm, David Doria <daviddo...@gmail.com> wrote:

> Good idea. I tried to do that, but the diff command fails:
> [dor...@doriadjec VTK-PCA]$ git remote add kitware git://vtk.org/VTK.git
> [dor...@doriadjec VTK-PCA]$ git fetch kitware master
> remote: Counting objects: 6937, done.
> ...
>  * branch            master     -> FETCH_HEAD
> [dor...@doriadjec VTK-PCA]$ git log --oneline VTK-PCA ^remotes/kitware/master
> fatal: bad revision '^remotes/kitware/master'
> I also tried without the ^ (I didn't know if it was a typo)
> [dor...@doriadjec VTK-PCA]$ git log --oneline VTK-PCA remotes/kitware/master
> fatal: ambiguous argument 'remotes/kitware/master': unknown revision or path 
> not
> Use '--' to separate paths from revisions
> [dor...@doriadjec VTK-PCA]$ git branch
>   VTK-daviddoria

Well, git fetch with explicitly specified refspecs does not auto-
create any branches and instead writes references to what it fetched
into .git/FETCH_FEAD, so to get a real branch created you have to
actually name it, like this:
$ git fetch -n kitware master:kwmaster
will create a local branch "kwmaster" which would contain the same
object as "master" in the "kitware" repository ("-n" tells git-fetch
not to fetch tags reachable via that branch's history).

Sorry for confusion.

The "^" prefix used with revisions fed to git-log is used for
exclusion, that is,
$ git log a ^b
means "show commits reachable from a but exclude those reachable from
b". See the section about ranges in git-rev-parse manual page.

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 
For more options, visit this group at 

Reply via email to