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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:53:28+00:00 2026-05-22T02:53:28+00:00

Original title: git – update all files that have not been changed Currently I

  • 0

Original title: git – update all files that have not been changed

Currently I am trying to update all files in a git repository that have not been changed. Lets say for example I have:

  • test1.py
  • test2.py

test1.py has been modified locally while both files have been modified remotely. Now I tried:

git stash
git pull
git stash pop

which restored my changes, giving me a warning that I need to merge test1.py. So far so good. The problem arises when I try to do the same process again (after both files have been again changed remotly). Git now says

unmerged (6b126638f7c63aa648609afa60ab972a2403502b)
fatal: git-write-tree: error building trees
Cannot save the current index state

which makes me kind of sad. It just want a simple thing: Update all files that I haven’t changed. I will take care of merging later.

  • 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-22T02:53:29+00:00Added an answer on May 22, 2026 at 2:53 am

    You resolved the conflict in your file (maybe? see footnote), but Git doesn’t know whether you’re done or not. You have to indicate to git that you’ve finished resolving that conflict. (Otherwise, if it let you move on and you hadn’t actually resolved it, you could find all kinds of ways to shoot yourself in the foot.)

    As far as I know, the way to do that is:

    git add <file>        # stage the resolved version, which marks it as resolved
    git reset HEAD <file> # unstage the changes, leaving the resolution just in the work tree
    

    It seems like there should be a way to do both at once with update-index but it’s not obvious to me from a quick look. (But then again, for actual merge conflicts, you never want to mark a conflict as resolved without staging the content; it’s just for stashes that this arises.)

    And as VonC says in his answer, should this happen again, you can easily see what things had merge conflicts when applying the stash using git status. They’ll be listed in red (if you have color on) and say unmerged (or maybe deleted by us/them if it was a delete/modify conflict).

    Footnote: Looking back at your question, I can’t actually tell if you fixed the conflicts or not – you just said “so far so good.” The “warning” you saw is really meant as a suggestion to resolve the conflicts immediately. The conflicts arose when trying to combine the changes which you pulled with the changes which you had stashed away. You have to resolve that conflict and get your work tree into a consistent state before you can move on in any way. Deal with it just as you would a merge conflict – look in the file, find the conflict markers, figure out what content to keep! (And then look back above for how to finish up.)

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

Sidebar

Related Questions

I have a Sharepoint 2007 site that is displaying the old/original title in the
Edit: My original title has been sort of changed. I suspect the current title
My title pretty much says it all. I have been looking at mod_pagespeed and
The original question is below, but I changed the title because I think it
The title pretty much says it all. How can I view the original SQL
I guess the title almost says it all. My original url looks like: http://www.something.com/buy/index.php?p=025823
As the title says, then I'm trying to cast a PropertyInfo to its original
my original title was How to customize TTMessageController for SMS transmission? . I changed
[ Original title referred to 'sizeof function'. ] I tried these and they all
Edit : I've restored the original title but really what I should have asked

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.