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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T20:56:32+00:00 2026-06-13T20:56:32+00:00

I have a git repository with 2 branches. My .gitignore specifies *.dll as one

  • 0

I have a git repository with 2 branches. My .gitignore specifies “*.dll” as one of the patterns.

  1. When in branch1, I copy-paste test.dll into the root folder.
  2. Then I switch to branch #2 using git checkout branch2.

My branch2 shows the newly added test.dll. I don’t want it to show up in branch2. Is it possible to associate this untracked and ignored file with branch1, so that it will only show up when I git checkout branch1?

Thank you.

  • 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-06-13T20:56:33+00:00Added an answer on June 13, 2026 at 8:56 pm

    It doesn’t seem to be easily done, and the solution proposed in “Using git, how do I ignore a file in one branch but have it committed in another branch?” doesn’t work.

    You can ignore it temporarily

    git update-index --assume-unchanged README.textile  
    

    But that is a local setting (it wouldn’t be propagated by a push like a .gitignore file would)

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

Sidebar

Related Questions

I have a git repository with 2 branches: master and test. There are differences
I have one git repository, there are many branches many commits, I want to
I have a git repository with two branches; one for code that's used for
I have local git repository on my pc with 2 branches, let's say branch1
Suppose I have a git repository with several branches. I suspect some of the
I have a git repository (at github.com) with two branches: master and gh-pages. I
I have some old branches in my git repository that are no longer under
I have a git repository named main_repo where the contents are HEAD branches config
If I have a public Git repository that contains 3 branches like the following:
I have four branches in my git repository, which is managed using GitHub: Production

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.