What means remote=. in GIT config?

git

Solution

That is quite strange. I went ahead and created a dummy repo, changed `.git/config` to make a remote be `.`, added some code, committed, and pushed.

$ git checkout weird
$ touch nothing
$ git add nothing
$ git commit -a -m "test"
[sup 031541e] test
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 nothing
$ git push
fatal: The upstream branch of your current branch does not match
the name of your current branch.  To push to the upstream branch
on the remote, use

    git push . HEAD:master

To push to the branch of the same name on the remote, use

git push . weird

$ git push . weird
Everything up-to-date

It appears to be hitting the repository locally, which of course means that a push results in git saying it's up to date.

Problem

I'm not sure how (branch created with EGit, probably) I ended with this section in my config: ``` [branch "master"] remote = origin merge = refs/heads/master [branch "sfc"] remote = . merge = refs/heads/master rebase = true ``` I would like to understand this. I'm not sure if the dot in `remote = .` is interpreted as url (current directory) or a special repository name (alias to myself)? Is that legal/normal/typical, or should I guess that this is messed up? It look strange to me to have a "remote" spec that points to the same repository. Furthermore, that branch indeed exists in the remote... What would be the implicancies of this regarding push/pull behaviour? Some more info: ``` $ git remote show origin * remote origin Fetch URL: ssh://git@10.0.0.3/var/gitrep/zzz.git Push URL: ssh://git@10.0.0.3/var/gitrep/zzz.git HEAD branch: master Remote branches: master tracked sfc tracked Local branch configured for 'git pull': master merges with remote master Local refs configured for 'git push': master pushes to master (fast-forwardable) sfc pushes to sfc (up to date) $ git branch -vv * master f394d8b [origin/master: ahead 1] Bla blah... sfc 8065309 [master: behind 89] Bla blah... ```

Original source