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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:32:27+00:00 2026-05-27T14:32:27+00:00

I am relatively new to git so this issue might be my own fault.

  • 0

I am relatively new to git so this issue might be my own fault. But it’s too fragile in my humble opinion. Any advice to revert the damage would be appreciated.

Here is my branch setup.

Machine A (Mac):
  master
  couch

Machine B (Windows):
  master

On Machine B, I am trying to pull both master and couch branches from Machine A. Unfortunately, I forgot I haven’t created the couch branch on Machine B yet. Here is what I did on Machine B. origin is set to Machine A.

git pull origin master
git pull origin couch

To my surprise, git automatically merge couch branch into master on machine B! My expectation is for git to create couch branch on machine B for me if it doesn’t exist.

How do I undo the merge? I am not ready to merge couch branch into master yet. I am going to delete it altogether on Machine B and clone again from Machine A. I am just curious if there are better solutions.

  • 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-27T14:32:28+00:00Added an answer on May 27, 2026 at 2:32 pm

    git pull origin couch

    will fetch the couch branch from Machine A and merge it with the current branch, which in your case would have been master and that is why you see couch merged into master. All you had to do was a simple git pull and then a git checkout -b couch origin/couch

    Just do git reflog, see where your master was previously and do git reset --hard <sha from reflog> or something like git reset --hard HEAD@{2}

    Or you can do git reset --hard ORIG_HEAD

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

Sidebar

Related Questions

I'm relatively new to Git, but I want to give it a try (vs
I'm relatively new to Git, and want to get advice on best practices for
I am relatively new to using Git. This is what I've done so far:
Relatively new to Cocoa here. This question is about NSFileHandle, but I got a
I am relatively new to Git and I want to know if this is
I'm relatively new to Git, but I've found it so easy to work with
Let me preface this by saying that I am relatively new to git so
I 'm relatively new to git and and having some problems early on. I've
Relatively new to WinForms but I'm working on a small business app. Anyway, where
Im relatively new to the Android world but I have a quick question. I

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.