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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T23:33:28+00:00 2026-05-29T23:33:28+00:00

I was working on a local branch and I needed to pull down one

  • 0

I was working on a local branch and I needed to pull down one of the branches from origin so I issued the following command:

git pull origin design

When I did that, that branch ended up being merged into my current local branch which is not what I wanted at all. So I need to do 2 things:

  1. How do I revert this merge back out of my local branch?
  2. How do I pull a branch from origin without it doing this merge?
  • 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-29T23:33:29+00:00Added an answer on May 29, 2026 at 11:33 pm

    To back out a merge commit created by the pull:

    git reset --hard HEAD^
    

    If the merge was a fast-forward merge (meaning you hadn’t done any work locally), then git reset --hard to the sha1 of the last commit you want to keep locally.

    To fetch a remote branch without merging:

    git fetch origin
    

    The remote branch will appear as something like origin/master (with git branch -a).

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

Sidebar

Related Questions

I am working on a local git repository. There are two branches, master and
I accidentially discard my changes on files in my local working tree via git
SELECT 1 FROM (SELECT 1 FROM table) q does not working on my local
How do I delete untracked local files from the current working tree?
Here's my scenario: I'm working on fixing bugs in file1 in a local branch.
I have a local branch that is tracking of a remote branch on git.
I have a local branch that I created via git branch --track <localFeatureBranch> <remoteSVNBranch>
I've been working on a local clone of a remote git repository, committing my
Can I set hooks for pull/pushing from/to a git-svn managed repository? The situation is
I've scoured the web and found a lot about working with git-svn and branches,

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.