# should git push . from:to work?

4 messages from 2007-02-01 to 2007-02-02. Participants: Michael S. Tsirkin, Johannes Schindelin, Jakub Narebski.
Thread: https://gitlist.dev/t/6604

## Michael S. Tsirkin, 2007-02-01 14:56

Subject: should git push . from:to work?
Message-ID: <20070201145659.GA30716@mellanox.co.il>
URL: https://gitlist.dev/e/20070201145659.GA30716%40mellanox.co.il

```
Should I not be able to use . as a URL?
git push seems to think . is a remote, not a URL:

mst@mst-lt:~/scm/sdpnetstat$ git push . refs/heads/master:refs/heads/ofed_1_2
fatal: remote '.' has no URL
mst@mst-lt:~/scm/sdpnetstat$ git push $PWD refs/heads/master:refs/heads/ofed_1_2
updating 'refs/heads/ofed_1_2' using 'refs/heads/master'
  from c16c0acb0906209868d5682d0668ada0f250da02
  to   cfc08ab244ece514f7c453d27397281129f14264
Generating pack...
Done counting 0 objects.
Writing 0 objects.
Total 0 (delta 0), reused 0 (delta 0)
Unpacking 0 objects

refs/heads/ofed_1_2: c16c0acb0906209868d5682d0668ada0f250da02 -> cfc08ab244ece514f7c453d27397281129f14264

So there's an easy workaround, but why does this work for pull but not for push?

-- 
MST

```

## Johannes Schindelin, 2007-02-01 15:00

Subject: Re: should git push . from:to work?
Message-ID: <Pine.LNX.4.63.0702011559100.22628@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0702011559100.22628%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <20070201145659.GA30716@mellanox.co.il>

```
Hi,

On Thu, 1 Feb 2007, Michael S. Tsirkin wrote:

> Should I not be able to use . as a URL?
> git push seems to think . is a remote, not a URL:

You seem to be infected by the less-than-intuitive
"git pull ."-makes-perfect-sense camp.

Why not just do "git branch to from"?

Ciao,
Dscho

```

## Michael S. Tsirkin, 2007-02-01 15:05

Subject: Re: should git push . from:to work?
Message-ID: <20070201150545.GA30858@mellanox.co.il>
URL: https://gitlist.dev/e/20070201150545.GA30858%40mellanox.co.il
In-Reply-To: <Pine.LNX.4.63.0702011559100.22628@wbgn013.biozentrum.uni-wuerzburg.de>

```
> Quoting Johannes Schindelin <Johannes.Schindelin@gmx.de>:
> Subject: Re: should git push . from:to work?
> 
> Hi,
> 
> On Thu, 1 Feb 2007, Michael S. Tsirkin wrote:
> 
> > Should I not be able to use . as a URL?
> > git push seems to think . is a remote, not a URL:
> 
> You seem to be infected by the less-than-intuitive
> "git pull ."-makes-perfect-sense camp.

Not really, I don't really care.

> Why not just do "git branch to from"?

Because I want to update am existing local branch that is different from what
I have checked out.

-- 
MST

```

## Jakub Narebski, 2007-02-02 10:02

Subject: Re: should git push . from:to work?
Message-ID: <epv25o$tpm$1@sea.gmane.org>
URL: https://gitlist.dev/e/epv25o%24tpm%241%40sea.gmane.org
In-Reply-To: <20070201150545.GA30858@mellanox.co.il>

```
Michael S. Tsirkin wrote:

>> Quoting Johannes Schindelin <Johannes.Schindelin@gmx.de>:
>> Subject: Re: should git push . from:to work?

>> On Thu, 1 Feb 2007, Michael S. Tsirkin wrote:
>> 
>> > Should I not be able to use . as a URL?
>> > git push seems to think . is a remote, not a URL:
>> 
>> You seem to be infected by the less-than-intuitive
>> "git pull ."-makes-perfect-sense camp.
> 
> Not really, I don't really care.
> 
>> Why not just do "git branch to from"?
> 
> Because I want to update am existing local branch that is different from
> what I have checked out.

But git-branch does _not_ do checkout, so you can use it to manipulate
branches even if you are on different branch (even if you have different
branch checked out)!

Neither git-fetch not git-push understand '.' remote; git-pull was (and is)
special case to allow git-fetch+git-pull workflow.
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git

```
