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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:39:59+00:00 2026-06-03T03:39:59+00:00

I did a git pull and found that one of my files needs to

  • 0

I did a git pull and found that one of my files needs to be merged.

I don’t really want to merge that file right now – I have another branch that I need to work on, and I will get back to this branch later to resolve the merge.

What is the best course of action for me to “undo” this pull? Or how can I hold off on this merge until I’m ready to deal with it? What do I need to do to be able to change branches, but then return to this unmerged state in my code?

  • 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-03T03:40:01+00:00Added an answer on June 3, 2026 at 3:40 am

    This is a good example of why I reckon doing a fetch instead of a pull is a good idea.

    What you can do is simply reset your branch to it’s previous state..

    git reset --hard HEAD~1
    

    or if you are already in the middle of the merge (resolving conflicts), just abort it..

    git merge --abort
    

    finish your changes and then…

    git fetch
    ...have a look at what's changed 
    git merge origin/branch 
    

    An easy way to see what has changed is to do

    git cherry branch origin/branch -v --abbrev=6
    

    That will give you a list of commits that are in the origin branch but not in your branch…if you need the details of what changed in that commit then

    git show commit --name-status
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Git 1.7.4.1. I want to push commits I did on one folder
I accidentally saved a file on the wrong branch. Then I did git reset
I want v0.1.27 of nodejs code base. This is what I did. git clone
I did git pull origin newbranch:newbranch ... but for some reason.. this tried merging
I just did git pull origin branch accidentally and now I have all these
To update my multiple repos, I did: git bulk fetch origin git bulk pull
I did a merge of 2 files and now Im trying to commit but
Basically, I have an open pull request that I want to fix and at
I just did a git pull --rebase origin master and there was a conflict.
I am trying to do a 'git pull --rebase', but I don't see any

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.