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

  • Home
  • SEARCH
  • 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 6733829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:48:58+00:00 2026-05-26T10:48:58+00:00

I have got a repository at github and several branches. The whole repo is

  • 0

I have got a repository at github and several branches. The whole repo is about 2 gigs. Before moving to git, I had an ant script that would checkout a folder from svn repository, build binary files and then commit back to the repository.

Unfortunately after switching to git, I can’t find a simple way to do it. Every time my ant script runs, I want it to get a fresh copy of folder from remote branch and commit back to it after doing some work. I do not want to download whole repsitory ( 2 GB of Data ) everytime I run ant script.

Here is an example of how my ant script looked with SVN

  • SVN CHECKOUT FROM http://project.branch15/subfolder/subfolder/subfolder
  • MODIFY SOME STUFF in /subfolder/subfolder/subfolder
  • SVN COMMIT BACK TO http://branch15/subfolder/subfolder/subfolder

With GIT workflow looks like

  • GIT INIT
  • GIT CLONE http://project.branch15 ( 2 GB )
  • MODIFY SOME STUFF in /subfolder/subfolder/subfolder
  • COMMIT branch 15
  • 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-26T10:48:59+00:00Added an answer on May 26, 2026 at 10:48 am

    This sounds like you have too much stuff in one repository. You should refactor it to use submodules. *If there is a folder than can live independent of their ancestors or siblings then it is a good candidate for a submodule.

    Git submodules are themselves git repositories and thus can be clones, checked out, modified and pushed to independent of the parent repository.

    You can also have a hierarchy of submodules. So in your example each subfolder could be a submodule. (but you should heed the above *).

    Another advantage of this approach is that you can clone the main repo (which might be 2GB) and assuming it is made up of some submodules (say 10 of ~200MB) without taking up the full 2GB. Then you can run submodule checkouts for the repos that you do want.

    Here is an example:

    File structure

      /MainApp/           
           /Utils    200MB
           /Lib    
    ^        /OSX    200MB
    ^        /WIN32  200MB
    ^        /WIN64  200MB  
    ^        /NIX    200MB 
           /Source   150MB 
                     =====
                     1.15GB
    

    If the ^ folders are each a submodule you could do the following

    $ git clone MainApp
      # Downloads the 200MB for Utils and the 150MB for Source (plus git files)
    $ cd MainApp
    $ git submodule update /Lib/OSX
      # Downloads the 200MB OSX folder
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Presently, we've got several main projects each in their own repository. We will have
I have a public repository at github.com with 2 branches : master and test
I'm trying to fetch a read-only git repository from github and have it be
I'm struggling to understand something about GIT. We've got a repository with a number
In my application, I've got several ViewModels that have a single service (repository, DAO,
I got a Repository of type Item My goal is to have the Repository
I got this scenario: I created a Git repository. $ git init Cloned an
I have a sad situation where my subversion repository got accidentally corrupted. Now I
I have git repository (powered by gitosis) on my local ubuntu server I want
I have a git repo I've been using for the last year on the

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.