Skip to contentSkip to conversation

pushing a delete-only commit consumes too much traffic

DISCUSSION Basin Ilya 2 participants 4 messages Jan 25, 2018 – Jan 26, 2018

lore
Share & tools
lore

Basin Ilya

author
#0 lore raw

Hi list.
I had a 60Mb worth of unneeded jar files in the project. I created a new branch and performed git rm on them. Now while I was pushing the change the counter of sent data reached 80Mb. Why is that?

#1 lore raw
Quoted 3 lines · Basin Ilya

I had a 60Mb worth of unneeded jar files in the project. I created a new branch and performed git rm on them. Now while I was pushing the change the counter of sent data reached 80Mb. Why is that?

Can you provide more info? Were the 60Mb of jars previously pushed in a commit that already existed on the upstream? Was the delete an actual removal of history or did you commit with the jars deleted, then pushed? Did you do a merge squash or delete branch to effect the removal. More info please.

Cheers,
Randall

-- Brief whoami:
NonStop developer since approximately NonStop(211288444200000000) UNIX developer since approximately 421664400
-- In my real life, I talk too much.

author
#2 lore raw
Quoted 1 line

Were the 60Mb of jars previously pushed in a commit that already existed on the upstream?

yes

Quoted 1 line

Was the delete an actual removal of history or did you commit with the jars deleted, then pushed?

I committed with the jars deleted

Quoted 1 line

Did you do a merge squash or delete branch to effect the removal.

No

Quoted 18 lines · Randall S. Becker
Quoted 3 lines · Basin Ilya

I had a 60Mb worth of unneeded jar files in the project. I created a new branch and performed git rm on them. Now while I was pushing the change the counter of sent data reached 80Mb. Why is that?

Can you provide more info? Were the 60Mb of jars previously pushed in a commit that already existed on the upstream? Was the delete an actual removal of history or did you commit with the jars deleted, then pushed? Did you do a merge squash or delete branch to effect the removal. More info please.

Cheers,
Randall

-- Brief whoami:
NonStop developer since approximately NonStop(211288444200000000) UNIX developer since approximately 421664400
-- In my real life, I talk too much.

#3 lore raw

So the point here is that the jars are still in the repository. They are deleted in your branch, but any objects depending on others (without a lot more information on your exact repository structure) may cause packed objects to be sent upstream. The delete is local to your branch, but the delete does not mean the objects are actually removed from your repository. To actually effect a removal, the objects would need to be no longer accessible, thus git gc would remove them permanently. That may be difficult depending on security on your upstream repository and what you are able to do there. So:

A--- B--- C

If A has no jars, B has the jars and has A as its parent, and C has no jars, but has B as its parent, then B is still accessible and the jars still exist in the repository but only not at the HEAD of your branch. Your tree may vary. How a push gets objects from your repository to your upstream depends on more information that I have but the point is that the jars still exist in a distributed sense. Your repository state and the upstream repository state do not need to be (and are likely not) identical.

Quoted 43 lines

-----Original Message-----
From: Basin Ilya [mailto:[email protected]]
Sent: January 25, 2018 10:08 AM
To: Randall S. Becker <[email protected]>; [email protected]
Subject: Re: pushing a delete-only commit consumes too much traffic

Quoted 1 line

Were the 60Mb of jars previously pushed in a commit that already existed

on the upstream?
yes

Quoted 1 line

Was the delete an actual removal of history or did you commit with the jars

deleted, then pushed?
I committed with the jars deleted

Quoted 1 line

Did you do a merge squash or delete branch to effect the removal.

No

Quoted 7 lines · Randall S. Becker
Quoted 3 lines · Basin Ilya

I had a 60Mb worth of unneeded jar files in the project. I created a new branch and performed git rm on them. Now while I was pushing the change the counter of sent data reached 80Mb. Why is that?

Can you provide more info? Were the 60Mb of jars previously pushed in a

commit that already existed on the upstream? Was the delete an actual removal of history or did you commit with the jars deleted, then pushed? Did you do a merge squash or delete branch to effect the removal. More info please.

Quoted 11 lines

Cheers,
Randall

-- Brief whoami:
NonStop developer since approximately NonStop(211288444200000000) UNIX developer since approximately 421664400
-- In my real life, I talk too much.