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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T15:10:15+00:00 2026-06-01T15:10:15+00:00

I recently did a git stash , then did some work on the branch

  • 0

I recently did a git stash, then did some work on the branch and committed it, and got these errors when trying to do a git stash apply:

CONFLICT (delete/modify): app/controllers/orders_controller.rb deleted in Updated upstream and modified in Stashed changes. Version Stashed changes of app/controllers/orders_controller.rb left in tree.
CONFLICT (content): Merge conflict in app/models/product.rb

git status shows the following:

 $ git status
# On branch develop
# Your branch is ahead of 'origin/develop' by 16 commits.
# Unmerged paths: 
#   (use "git reset HEAD <file>..." to unstage)
#   (use "git add/rm <file>..." as appropriate to mark resolution)
#
#   deleted by us:      app/controllers/orders_controller.rb
#   both modified:      app/models/product.rb

The file marked “delete/modify” was a new file that I added and hadn’t yet committed before the stash.
I’d like to be back in the state I was in before the git stash — having uncommitted local changes. Can you suggest how to make that happen?

Thanks.

  • 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-01T15:10:17+00:00Added an answer on June 1, 2026 at 3:10 pm

    You are popping the stash onto a different state; state that has one additional commit. And worse, the commit has introduced merge conflicts, as you know.

    You have two options:

    1. pop that stash onto the latest commit and resolve the conflicts
    2. pop the stash onto the prior commit.

    Sounds like #2 is what you want to do. Use:

        git stash branch new_branch [<stash>]  # <stash> will be the last one if not provided.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently did some work modifying a Python gui app that was using wxPython
I re-did my portfolio site recently, and I'm trying to make it so that
Recently I was trying some practice programs in python and I came across this
I recently did some refactoring of my mvc application and realized that there are
I recently did a big update on my wordpress site, thus some old permalink
I recently did some performance testing and analysis of an ASP.NET application using out-of-process
I've recently did some web design as a hobby with a primary motivation to
Recently I have learned the basics concepts of Git. We did use a bit
I recently started using Git when creating a new project - until then I
I recently did some rough performance measuring on List<> vs [] for an array

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.