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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T14:16:06+00:00 2026-05-14T14:16:06+00:00

If I compile branch A, then switch to branch B, compile, and switch back

  • 0

If I compile branch A, then switch to branch B, compile, and switch back to branch A.

All the object files touched by the compile of branch B have to be recompiled!

Normally one does not check-in object files, but there seems little choice here.

What are the ideal working practices here?

  • 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-14T14:16:06+00:00Added an answer on May 14, 2026 at 2:16 pm

    Only the object files whose dependencies differ between the two branches need to be rebuilt.

    When switching branches git doesn’t touch files that don’t differ between the two branches.

    So long as you have appropriate dependencies expressed or deduced in your build system, an incremental build after a branch switch will work and be reasonably efficient. In many of my projects I switch branches often and incremental builds are fast and reliable.

    If you want to work on two branches without wanting to rebuild at all when switching branches you should use a second clone and work in independent working areas.

    Checking in object files into the same repository as the source that creates them is almost always a bad idea. For a start, it allows the possibility of checking in input and output that are inconsistent.

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

Sidebar

Related Questions

dir(re.compile(pattern)) does not return pattern as one of the lists's elements. Namely it returns:
The below does not compile: Func<int, int> fac = n => (n <= 1)
i expect to have more than one million files with unique names. I have
When we compile a java program, we get .class files. Can I access these
On my local branch, I have some personal (local-only) changes to a Makefile (just
I have local folder that is branch from formal_versions. My workflow is: Mkae changes
I have installation of MinGW in D:\mingw. I have Git installation in C:\Program Files\git.
I first switch to a separate heroku_branch branch to keep the precompiled assets from
I've been banging my head all day trying to fix this. I have a
Background one trunk and one branch in a standard svn layout, /trunk and /branches/prod

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.