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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:18:00+00:00 2026-05-13T20:18:00+00:00

I find git docs very cryptic regarding this issue. I want to do a

  • 0

I find git docs very cryptic regarding this issue. I want to do a simple thing, but it seems doing it is not simple at all.

I have the following situation:

$ git remote -v
origin  git://192.168.0.49/mnt/repos
stick   /mnt/titanium/podaci/repos

I can use git pull to fetch and merge from origin, and that works fine:

$ git pull
Already up-to-date.

I can pull from stick like this:

$ git pull stick master
Already up-to-date.

However, when I pull from stick without the master part, I get this message:

$ git pull stick
From /mnt/titanium/podaci/repos
 * [new branch]      su2009  -> stick/su2009
You asked me to pull without telling me which branch you
want to merge with, and 'branch.master.merge' in
your configuration file does not tell me either.  Please
name which branch you want to merge on the command line and
try again (e.g. 'git pull <repository> <refspec>').
See git-pull(1) for details on the refspec.

If you often merge with the same branch, you may want to
configure the following variables in your configuration
file:

    branch.master.remote = <nickname>
    branch.master.merge = <remote-ref>
    remote.<nickname>.url = <url>
    remote.<nickname>.fetch = <refspec>

See git-config(1) for details.

Some things confuse me here. What does “your configuration file” mean here? Which file should I edit, and what exactly should I type in? What’s nickname in this case?

I would expect that what I’m trying to accomplish is very common, but I haven’t been able to find a straight-to-the-point answer with an example.

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

    What does “your configuration file” mean here?

    Your repo’s configuration file, found at .git/config at the root of your repo. (There’s also a per-user global config file at ~/.gitconfig, but you don’t want to put repo-specific settings there.)

    Which file should I edit, and what exactly should I type in?

    You can use the git config program to write configuration information, instead of entering it manually. However, if you want to do it manually, just open up .git/config — the syntax is fairly straightforward.

    What’s nickname in this case?

    Nickname, in this case, is the name of the remote — so “stick”. You don’t have to worry about the remote.* options, as those have already been set up, but you do need to set the branch.* options. These options tell Git what to merge when doing a git pull from stick.

    Say you want to merge in master from stick when doing a git pull from stick. You can do so like this:

    # Sets stick as default remote for git pull.
    # Note that origin will no longer be the default remote for git pull!
    $ git config branch.master.remote stick
    
    # Automatically merge in stick's master branch when doing a git pull
    $ git config branch.master.merge refs/heads/master
    

    So now, when you do a git pull without any remote or refspec info, it’ll fetch all the branches from stick, and merge in stick’s master branch. Note that origin will not be the default remote anymore; to merge in origin’s master branch, you’ll have to use git pull origin master.

    If you don’t want to change the default remote to stick, you’ll have to continue using git pull stick master.

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

Sidebar

Related Questions

This seems like the simplest Git question, but I can't find ANYTHING on it.
I want to find all files/dirs that are not equal to .git* , so
I have been looking around for an answer to this, but couldn't really find
In this announce Apple says that Xcode 4 support Git. But in my SCM
I've used git-blame to find a particular commit. Now I want to find the
git newbie here, bear with me if this is trivial. I cannot find this
I find the use of git add --patch very useful for my work-flow sometimes,
I was looking for this before but I couldn't find it. Using: Ubuntu 11.10
Is there a git find analogue of git grep , i.e., something that will
I'm trying to find a Git Commit Monitor for Windows. Does anyone know whether

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.