为什么每次推送原始主机时,Git都会发送整个存储库 [英] why does Git send whole repository each time push origin master

查看:142
本文介绍了为什么每次推送原始主机时,Git都会发送整个存储库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在本地进行了一些更改,然后使用'git push origin master'推送到github。它总是推动完整的代码库(根据传输的数据量来判断)。

我必须缺少一些简单的东西..应该只推动已更改的文件..?

解决方案

对我来说,这也是一个谜。我的同事发现创建跟踪分支有助于:

http://www.zorched.net/2008/04/14/start-a-new-branch-on-your- remote-git-repository /



编辑我发现在创建远程分支之前,如果我先拉,它几乎没有发送任何东西。


I commit a few changes locally and then push to github using 'git push origin master'. It always pushes the complete code base (judging by the amount of data transferred).

I must be missing something simple.. should only push up the changed files..?

解决方案

That is a mystery to me too. My colleague has found that creating tracking branches helps:

http://www.zorched.net/2008/04/14/start-a-new-branch-on-your-remote-git-repository/

EDIT I found that this happens when I don't pull before creating a remote branch. If I pull first, it sends barely anything.

这篇关于为什么每次推送原始主机时,Git都会发送整个存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆