I have a repository with lots of binary files (about 250MB) - I don't know if that is important.
I'm making a new branch and trying to publish it on the central server:
git checkout -b newbranch
git push origin newbranch:newbranch
Now here, git is trying to push 30MB of data to the server. Why?? There are no changes.
Also tried to make a bundle:
开发者_如何学运维git bundle afile master..newbranch
fatal: Refusing to create empty bundle.
What is wrong?
It's to do with the way git stores the data and how a push works. I'm guessing that pushing the new branch is not what's causing the data transfer but a previous commit that's also missing from origin is being pushed as well.
This is why git's a very bad idea for log files - I tend to add them to the .gitignore file so they never get committed, even by mistake :)
Maybe not a useful answer, but I tried this exact thing, and git didn't send up any objects. So maybe there was a commit in there, and you didn't realize it.
精彩评论