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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:36:59+00:00 2026-05-26T20:36:59+00:00

We have a problem/misunderstanding with our current git setup. We have local master and

  • 0

We have a problem/misunderstanding with our current git setup. We have local master and a local feature/user branches. The branches are connected to different default remote branches. If I checkout the master and want to pull the latest changes, git tells me that I am ahead of the remote master. Looking at the diff of a file that I expected to be pulled from the remote, I see that it is still an old file, not having the latest changes from the remote.

Here is my sample workflow + output:

$ git checkout master
Already on 'master'
Your branch is ahead of 'origin/master' by 8 commits.

I do not want to push, but I want all files updated locally:

$ git pull origin/master
From git://...
* branch      master -> FETCH_HEAD
Already up-to-date.

Now let’s look at a file (somefile) that should have been updated:

$ git diff origin/master somefile
# this is not supposed to show anything but it results in a diff output

diff --git a/... b/...
index ...
---
+++
@@ -1,9 +1,8 @@
 ...    
-remoteText that I actually want to have
+localText that I wanted to be updated/replaced
 ...

Here is the origin config:

$ git remote show origin
* remote origin
  Fetch URL: git://...
  Push  URL: ssh://...
  HEAD branch: master
  Remote branches:
    juve                               tracked
    horst                              tracked
    master                             tracked
    temp                               tracked
  Local branches configured for 'git pull':
    master            merges with remote master
    feature1-juve     merges with remote juve
  Local ref configured for 'git push':
    HEAD forces to master (fast-forwardable)

Does this mean that the somefile is (wrongly) modified by one of the pending commits?
Unfortunately, before doing the described git checkout master some “wild” merging and branch switching has been going on that I could not track anymore (the whole setup is actually not my own, but my colleagues, who often impatiently clicks around in his Eclipse egit). I believe that some “cross merging” has been done that produces old content to appear in the pending commits for the master branch.

Can you tell me what is wrong here? Where is my/our misunderstanding?

PS: The colleague did a reset and is now working again on her code. Therefore, I cannot easily present you the related git log --pretty=oneline merge logs.

  • 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-26T20:37:00+00:00Added an answer on May 26, 2026 at 8:37 pm

    In your case, git pull doesn’t need any args, so you may be confusing things by passing the origin/master arg to it.

    It shouldn’t need args because git already knows what remote branch your local master branch refers to (this is origin/master). You can see this in your .git/config file.

    Also, I would suggest doing git pull --rebase instead of a regular old git pull. This will ‘replay’ the 8 new, local commits on top of the latest master and force you do deal with any conflicts. You don’t have to deal with any extra conflicts this way (if you had to deal with them, you would have gotten conflicts with a regular git pull too). The gain with this is that you save face and don’t introduce an un-necessary extra merge commit into the history.

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

Sidebar

Related Questions

I have problem in some JavaScript that I am writing where the Switch statement
I have problem with return statment >.< I want to store all magazine names
I have problem with starting processes in impersonated context in ASP.NET 2.0. I am
I have problem compilin this code..can anyone tell whats wrong with the syntax CREATE
I have problem with ActionLink. I'd like to pass to my ActionLink parameter for
I have problem when I try insert some data to Informix TEXT column via
I have problem creating new instance of excel 2007 using VBA (from Access 2002).
I have problem with fancybox. I want to write a function that will run
i have problem with autorotate on iphone i set up in all classes -
I have problem with cakephp's Session->write method. If I set a value like $_SESSION['..']

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.