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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T16:45:24+00:00 2026-06-10T16:45:24+00:00

I am using git to track a large LaTeX document which I write using

  • 0

I am using git to track a large LaTeX document which I write using Kile on different machines.

Kile writes to its .kilepr config file when closing Kile. The problem I often run into is that I commit before closing Kile. So I commit and push, work on the other machine, and when I come back and want to pull I get a merge conflict because the .kilepr file contains the cursor position (which obviously changed now).

My question: Is there a way to add a merge rule to git config for a specific file (always use –theirs)? Using .gitignore is not an option since the .kilepr file contains important information such as files in the project.

  • 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-10T16:45:25+00:00Added an answer on June 10, 2026 at 4:45 pm

    All possible ways to simulate a merge -s theirs are listed in “git command for making one branch like another“.

    But for one file, all you need is a merge driver, declared in a .gitattributes file, with a keepTheir script like:

    mv -f $3 $2
    exit 0
    

    See ““git merge -s theirs” needed — but I know it doesn’t exist” for a concrete example of a custom merge driver (including my own version).

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

Sidebar

Related Questions

I am using Git to track my documentation latex source. I want to keep
I know you can track a svn repo with git by using git svn
I'm using git + pathogen to track my vim plugins. I have a git
I've been using git for a while on a project, and its time to
I'm using git to track a project I'm developing in Flash Builder, and I'm
I am using git to track changes in configuration files of third-party application. At
I'm using git to track a C++ project in VS2010. I'm using ignore patterns
Currently my team of 5 is using a GIT repository to track changes we
I'm using Git to track some matlab code. A toy example best illustrates the
I'm using git to track a project, and if it's possible, I'd like to

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.