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

The Archive Base Latest Questions

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

As interesting and useful as the answer to How to setup a git driver

  • 0

As interesting and useful as the answer to How to setup a git driver to ignore a folder on merge was, it did not answer the original question which still has me stumped.

Unlike the question linked to above, I have two branches with the same set of directories and for merging one into the other I need git to ignore one directory completely.

I tried it with my own merge driver as described in How do I tell git to always select my local version for conflicted merges on a specific file? but the problem with this approach is that this driver is only invoked when there is an actual conflicting file in these two branches. Whenever the changes of a file are only on one branch, git merges them without calling my merge driver.

This leads to changes in files in the directory that I do not want. Any idea how I could make git ignore each and every file in that directory all the time – whether it was touched or not?

  • 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-17T13:56:33+00:00Added an answer on June 17, 2026 at 1:56 pm

    I don’t actually use Git, but I think this would work for your case:

    Use something like what’s specified here: https://gist.github.com/564416

    git checkout master    
    git merge --no-commit --no-ff development
    git reset -- /path/to/folder # revert updates from path
    git commit
    

    Again, I don’t use git, I am just deferring to how I think things work based on my experience with TryGit.

    1. checkout master
    2. merge, but don’t commit, no fast forward.
    3. merges are now staged, so reset that entire directory tree
    4. commit
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

An interesting question is how pentaho data integration fits and perhaps would be useful
I asked a question about C-type sizes which I get a pretty good answer
For reasons which shall not be enumerated here, I've found it potentially useful to
A friend just asked me this interesting question and I had no answer to
Note: This is question to which I have already found an answer. It seems
This question already has an answer here: Is there ever a reason to not
An interesting question arose today. Let's say I have a .NET object that implements
I found a very interesting question. When I'm using following code: int main() {
I had an interesting job interview experience a while back. The question started really
My answer for a recent question about GOTOs and tail recursion was phrased in

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.