git push标记发送的对象太多

git push标记发送的对象太多,git,git-push,Git,Git Push,将新标记推送到远程存储库时,我面临一个问题。它似乎在为每个新标签发送整个存储库。但是,我从我处理的分支创建标记,在推标记之前先推分支。当我推送分支时,它只发送新的提交对象 直到最近,我使用以下程序已经两年多没有问题了 我在本地开发部门(如master)做了一些更改,然后将其推到远程: host:folder user$ git push origin master Fetching remote heads... refs/ refs/heads/ refs/tags/ updati

将新标记推送到远程存储库时,我面临一个问题。它似乎在为每个新标签发送整个存储库。但是,我从我处理的分支创建标记,在推标记之前先推分支。当我推送分支时,它只发送新的提交对象

直到最近,我使用以下程序已经两年多没有问题了

我在本地开发部门(如master)做了一些更改,然后将其推到远程:

host:folder user$ git push origin master
Fetching remote heads...
  refs/
  refs/heads/
  refs/tags/
updating 'refs/heads/master'
  from 226334abbe733ffa8bb1a0fb8a34843aa9127c13
  to   ccdfb7de73d4a17b31aa83e0c9626e19b23717ac
    sending 23 objects
    done
Updating remote server info
To https://githost/repo/
   226334a..ccdfb7d  master -> master
然后我签出生产分支,合并更改并推送该分支:

host:folder user$ git checkout production
Switched to branch 'production'
Your branch is up-to-date with 'origin/production'.

host:folder user$ git merge master
Updating 226334a..ccdfb7d
Fast-forward
 CHANGELOG.txt                                                   |  8 ++++++++
 data/migrations/Version20160704122217.php                       | 30 +++++++++++++++++++++++++++++
 module/FileStorage/src/FileStorage/Entity/Node.php              |  3 ++-
 module/FileStorage/src/FileStorage/Entity/Node/Impression.php   |  2 +-
 .../view/file-storage/partials/bucket/_history.phtml            |  2 +-
 5 files changed, 42 insertions(+), 3 deletions(-)

host:folder user$ git push origin production
Fetching remote heads...
  refs/
  refs/heads/
  refs/tags/
updating 'refs/heads/production'
  from 226334abbe733ffa8bb1a0fb8a34843aa9127c13
  to   ab9069e85d1557129b1fb3cd4cd97e9708316133
    sending 26 objects
    done
Updating remote server info
To https://githost/repo/
   226334a..ab9069e  production -> production
到目前为止,一切顺利。 然后我创建一个新标签并按下它。这是当它发送太多对象时:

host:folder user$ git tag -a 1.3.21 -m "deploy 1.3.21"
host:folder user$ git push origin 1.3.21
Fetching remote heads...
  refs/
  refs/heads/
  refs/tags/
updating 'refs/tags/1.3.21'
  from 0000000000000000000000000000000000000000
  to   98008ee504cd2997bb8a160e497bc82d2c539a0e
    sending 46340 objects
    done
Updating remote server info
To https://githost/repo/
 * [new tag]         1.3.21 -> 1.3.21
我已确保我的本地分支机构是最新的。当我这样做的时候

host:folder user$ git fetch origin
host:folder user$ git rev-list origin/master..master
host:folder user$ git rev-list origin/production..production
我没有得到任何结果,我将其解释为本地分支中没有丢失的提交

我在这里读了很多相关的帖子,但没有找到一个答案,也没有一张海报有完全相同的问题

如有任何提示,我们将不胜感激。谢谢:)

编辑:有关我的git版本和设置的一些信息(匿名):


奇怪的是,当我进行推送时,我没有得到任何“获取远程磁头…”输出。我使用的是Git2.7.4(Apple git-66),为我创建了一个新标签,推送它也不会发送所有这些对象。您使用的是什么版本的git?还有,您的配置标志是什么?(git config--list)@DavidN我在问题中添加了配置设置,thx:)你认为46340代表什么?它是否更接近于此时您项目中的文件数,或是
生产分支历史记录中的对象数(即每个文件的计数次数与该分支上的修订次数相同)?@Leon我认为这是提交对象数。自上一个标记以来,该数量随着新提交对象的数量而增加。例如,如果我对分支中的15个新对象进行更改,然后创建并推送一个新标记,则计数将增加15。而且,文件数量还不到这个数字的三分之一。
host:folder user$ git version
git version 2.7.4 (Apple Git-66)

host:folder user$ git config --list
credential.helper=osxkeychain
user.name=John Doe
user.email=john@example.org
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
core.ignorecase=true
core.precomposeunicode=true
remote.origin.url=https://githost/folder
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.production.remote=origin
branch.production.merge=refs/heads/production