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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T00:48:58+00:00 2026-05-15T00:48:58+00:00

I have a remote tracking branch tracked locally in my local repository using ‘git

  • 0

I have a remote tracking branch tracked locally in my local repository using ‘git branch -b branch-name origin/branch-name’.
My remote branch is test2/test2 (origin/branch-name) which is being tracked locally as test2.

The origin is also named test2.
I haven’t checked-out my local tracking branch test2.

When i do a ‘git pull origin remote-branch:local-tracked-branch’ i get this error

[test2]$ git pull test2 test2:test2
From /gitvobs/git_bare/test2
! [rejected] test2 -> test2 (non fast forward)

Whereas when i checkout my local tracking branch test2
and do pull ‘git pull origin local-tracked-branch’ i don’t get the error
and i do a pull using ‘git pull test2 test2’

From /gitvobs/git_bare/test2
* branch test2 -> FETCH_HEAD
Auto-merging a.txt
Automatic merge failed; fix conflicts and then commit the result.

i know that adding a + (git pull test2 +test2:test2) would help but it overwrites local changes.

So how do i know which of my local branches are created by me locally using ‘git branch new-branch-name’ or tracked locally from remote branches using git branch -b branch-name origin/branch-name’?

  • 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-15T00:48:58+00:00Added an answer on May 15, 2026 at 12:48 am

    Independently of the list of tracked branched (which you can see with git config -l), a “non-fast-forward” message means cannot merge the remote branch (i.e. the local copy of the fetched commit of the remote branch) in your branch because:

    • your branch has commits of its own
    • the remote branch has new commits since the last pull

    so:

      --last pull
      |
      v
    x-x-x-x-x <--test2
      \
       -y-y-y <-- test2/test2
    

    Whereas this would have been a fast-forward merge

      --last pull
      |
      v
    x-x <--test2
      \
       -y-y-y <-- test2/test2
    

    So:

    git checkout test2
    git fetch test2 test2 
    git merge test2/test2
    #fix conflicts
    git commit
    

    And please, do call your remote repo any other name than test2. That is way too many test2 here 😉


    Now for the list of remote branches tracked in your local repo:

    git config --get-regexp branch..*
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a local branch that is tracking of a remote branch on git.
I have a local branch tracking the remote/master branch. After running git-pull and git-log
I have a local topic branch that's tracking a remote branch. For the sake
Tracking a single remote branch as a local branch is straightforward enough. $ git
Suppose I have a tracking branch named ' abc ' which tracks origin/master .
In a git repository, a remote branch I am not tracking was deleted. When
I have a a remote git repo and a local clone. Let's say I
I have a git repository with remote foo. foo is a web app, is
I'm using git-svn to work with an SVN repository. My working copies have been
I am getting this error when trying to create a remote tracking branch git

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.