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 905359
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T16:12:17+00:00 2026-05-15T16:12:17+00:00

Some Background I have been using Git for a while now. The projects that

  • 0

Some Background

I have been using Git for a while now. The projects that I have been working on have not been too complicated in regards to branches/tags.

I have decided to use git-svn at work. The SVN repository has many different branches. A lot of these branches are customer customized versions of the trunk.

The Problem

I often work on problems for different customers at different the same time. So I switch back and forth between branches all the time. The problem is that to test the products I have to rebuild the project each time I switch between branches. A build takes > 2 hours (from scratch):(

I am assuming that there is a way to stash the build files in branch customer_a and then checkout customer_b, modify, build, test, commit. Then stash the build files and checkout customer_a again and pop the customer_a stash to get back to where I was.

This only works if the build files are tracked (i.e. added or committed). I do not want to track the build files and I definitely do not want to check them in. Is there a way to stash (or do something similar) for non-tracked files? Or a common practice that people use to achieve the same type of thing?

Note that the way our project gets built each library (of which there are thousands) gets builds the files local to the library folder i.e. they are not moved to a build folder at the root of the project. All the built files are spread out all over the place.

Update…

So based on some of the comments I think I need to give an example of my problem

Here is my folder structure.

branch1/
      src/
         component1/
                    c1.c
         component2/
                    c2.c
      libsrc/
          library1/
                    lib_1.c
          library2/
                    lib_2.c

branch2/
      src/
         component1/
                    c1.c
         component2/
                    c2.c
      libsrc/
          library1/
                    lib_1.c
          library2/
                    lib_2.c

So the problem is that branch1 and branch2 have the same ancestry but have diverged quite a bit. So if I check out branch1 and build it I will get binaries (e.g. lib_1.o) that I link against in my Makefile to build the final component binaries.

If I then checkout branch2 make a change to c1.c and run make it tries to link to the binaries that were created by branch1 (lib_1.o), since they still exist in the directories as built in the previous branch. To avoid this I have to do a clean build each time I switch branches (which takes hours).

  • 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-15T16:12:18+00:00Added an answer on May 15, 2026 at 4:12 pm

    Okay

    So this question has been unanswered for a while now and I just been trying different solutions locally.

    The best one I came up with is to use pre amd post checkoout hooks.

    Here is what I have done

    1. Create a .binaries folder at the top level of your repository and add it to the .gitignore file.

    2. Add the file formats of the binaries to your .gitignore file also.

    3. write a script in your favorite scripting language to find all files of said format that moves them to the .binaries/<BRANCH>/ folder under the same path structure e.g. src/library1/lib1.o should be MOVED to .binaries/<BRANCH>/src/library1/lib1.o – this should be called by pre-checkout

    4. Write a script to move files from the .binaries folder into the current branch e.g. .binaries/<BRANCH>/src/library1/lib1.o should be MOVED to src/library1/lib1.o – this should be called by post-checkout

    Now switching between branches will revert to the binaries that were built during for that branch only and you will have a clean checkout when creating a new branch.

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

Sidebar

Ask A Question

Stats

  • Questions 501k
  • Answers 501k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Use setAdapter() on AlertDialog.Builder to supply your own custom ListAdapter… May 16, 2026 at 2:11 pm
  • Editorial Team
    Editorial Team added an answer remove the object from the data set before deleting the… May 16, 2026 at 2:11 pm
  • Editorial Team
    Editorial Team added an answer post() doesn't take a block. Try this: page = browser.post('http://www.mysite.com/login',… May 16, 2026 at 2:11 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I come from a Codeigniter MVC background that we've been working with for some
I have been using emacs for a while for mainly python programming, and have
Background: I've been using the November 2009 release of the Silverlight Toolkit Charting components
Some background: I setup six blogs this week, all using Wordpress 2.92, installed with
I have about 4-5 years of background in programming some in C# and some
Some background, this application is a printing application that runs within REvit Structure, an
Some background One of my current clients runs a chain of Internet points where
I have been trying to use the Perl utility/module "prove" as a test harness
OK, I know that this has been asked previously, so please forgive me for
Little context: We are a team of 6 developers working a web application. Since

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.