将主分支推送到远程目标时:tmp
git push tmp master
我收到这条消息
warning: Duplicated ref: refs/heads/master
push 还是可以成功的。
但这条消息是什么意思?我怎样才能找到有关此的更多详细日志信息?
这是我的 .git/config
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
hideDotFiles = dotGitOnly
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:testuser/myproject.git
[branch "master"]
remote = origin
merge = refs/heads/master
[remote "tmp"]
url = git@192.168.1.44:testuser/myproject.git
fetch = +refs/heads/*:refs/remotes/tmp/*
我的 git 版本是1.7.11.msysgit.1
show-ref
和ls-remote
信息
$ git show-ref
1696d17186db41cc70876f76f943e18ea4708ad3 refs/heads/master
3c51688bf27e712001db1b6e9f316748634643c4 refs/remotes/origin/HEAD
3c51688bf27e712001db1b6e9f316748634643c4 refs/remotes/origin/master
1696d17186db41cc70876f76f943e18ea4708ad3 refs/remotes/tmp/master
$ git ls-remote tmp
warning: Duplicated ref: refs/heads/master
1696d17186db41cc70876f76f943e18ea4708ad3 HEAD
1696d17186db41cc70876f76f943e18ea4708ad3 refs/heads/master
$ git ls-remote origin
3c51688bf27e712001db1b6e9f316748634643c4 HEAD
3c51688bf27e712001db1b6e9f316748634643c4 refs/heads/master
git show-ref
在 tmp 上的输出
$ git show-ref
warning: Duplicated ref: refs/heads/master
1696d17186db41cc70876f76f943e18ea4708ad3 refs/heads/master
packed-refs
tmp 上的内容
# pack-refs with: peeled
3c51688bf27e712001db1b6e9f316748634643c4 refs/heads/master
3c51688bf27e712001db1b6e9f316748634643c4 refs/heads/master
find .
裸回购中的输出myproject.git
。对象文件夹有太多子文件夹,所以我不粘贴它们。
$ find .
.
./branches
./packed-refs
./objects
./HEAD
./info
./info/exclude
./config
./description
./refs
./refs/tags
./refs/heads
./refs/heads/master
./hooks
./hooks/commit-msg.sample
./hooks/update.sample
./hooks/pre-commit.sample
./hooks/prepare-commit-msg.sample
./hooks/post-update.sample
./hooks/pre-rebase.sample
./hooks/post-receive
./hooks/pre-applypatch.sample
./hooks/update
./hooks/applypatch-msg.sample