Skip to contentSkip to conversation

should git push . from:to work?

DISCUSSION Michael S. Tsirkin 3 participants 4 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

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?

Signature · 1 line
MST
#1 lore raw

Hi,

Quoted 2 lines · Michael S. Tsirkin

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

#2 lore raw
Quoted 5 lines

Quoting Johannes Schindelin <[email protected]>:
Subject: Re: should git push . from:to work?

Hi,

Quoted 7 lines
Quoted 2 lines · Michael S. Tsirkin

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.

Quoted 1 line

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.

Signature · 1 line
MST
#3 lore raw
Quoted 11 lines · Michael S. Tsirkin
Quoted 10 lines

Quoting Johannes Schindelin <[email protected]>:
Subject: Re: should git push . from:to work?

Quoted 2 lines · Michael S. Tsirkin

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.

Quoted 6 lines

Not really, I don't really care.

Quoted 1 line

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.

Signature · 3 lines
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git