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 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:
How do I compile, link and call different YACC grammars using yyparse() in one
When attempting to compile my C# project, I get the following error: 'C:\Documents and
Is it possible to compile and run OpenGL programs from under Cygwin? If yes,
I would like to compile a DLL under Visual Studio 2008 that depends on
When we compile a dll using __stdcall inside visual studio 2008 the compiled function
Let's compile a list of tips. (Understandably there will be some subjectivity involved, but
I'm trying to compile a Delphi 7 project that I've inherited, and I'm getting
When I try to compile the newest version of Clisp on Ubuntu 8.04 I
If I want to compile my .NET applications for a 64 bit environment. Do

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.