Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3349546
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T01:40:40+00:00 2026-05-18T01:40:40+00:00

I am occasionally on an expensive Internet connection and I would like to know

  • 0

I am occasionally on an expensive Internet connection and I would like to know (at least approximately) how much data will be pushed to the remote in a git push.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T01:40:40+00:00Added an answer on May 18, 2026 at 1:40 am

    Actually, I think I like my comment enough to post it as an answer!

    When you push, git creates a pack of all the necessary objects and uploads that to the remote. This means we’re looking for a way to predict that pack size. Since the packs are compressed, that makes it very difficult to do anything based on diffs or object sizes; what we really want to do is just see how big that pack will be. It’d be nice if you could interrupt the push, just after it’s constructed the pack, and decide to proceed based on the pack size, but I don’t think that’s possible. My best guess is to try to recreate the pack that would be pushed and inspect that.

    A bundle file is basically a pack with header information (have a look at the source if you like). This means it’s a convenient porcelain command that’ll create a file with the size you care about. (Much easier than trying to use pack-objects manually.) Use something like this:

    git bundle create foo.bundle ^origin/master master
    

    That’ll give you a bundle containing everything needed to get to master, given that the remote has origin/master – exactly the same thing that should be pushed by git push origin master. If you have additional branches you’ll be pushing, you can tack them on as well; it’s just taking rev-list args:

    git bundle create foo.bundle ^origin/master master ^origin/topic topic ...
    

    Just check the size of that created bundle; it should be nearly equivalent to what you’ll end up pushing. This does mean that you’ll end up having to create the pack twice (once with the bundle and once with the push), but unless this is a really big push which takes a long time to pack up, that shouldn’t be a huge problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Occasionally I will know that there is a .NET Framework function that returns a
Occasionally, I will write some code with way more parentheses than I like. if(!(new
Occasionally a TextView with dynamic content will show a price. For example, as part
Occasionally in our lab, our postgres 8.3 database will get orphaned from the pid
Occasionally I find code which tests if two NSString s are the same like
Occasionally I like to spend some time looking at the .NET code just to
Occasionally I like to work completely disconnected from a network. In those cases it's
I occasionally get this error when saving to core data. I cannot manage to
Occasionally, but more often than I'd like, AJAX calls just don't work in IE
Occasionally I'll have some WPF C# code that I'd like to write in a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.