[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: git not fetching from origin...

From: Patrick McCarty
Subject: Re: git not fetching from origin...
Date: Sun, 24 May 2009 21:57:14 -0700
User-agent: Mutt/1.5.18 (2008-05-17)

On Sun, May 24, 2009 at 07:40:08PM -0700, Mark Polesky wrote:
> I guess I'm confused about the difference between origin and 
> master. And the difference between pulling and fetching (and 
> cloning, though that's not mentioned in the CG).

"git clone" is a command that you use to *copy* the remote LilyPond
repository from to your computer.  So, you only need to
do this one time.  The "git remote" method described in the CG can be
useful, but if you are just working on the LilyPond source code, "git
clone" should work just fine.

"git fetch" updates your remote tracking branches to the latest state
of the repo at

"git pull" does a "git fetch" first, and then merges the latest
changes from the remote repo with the commits (if any) you have made
on your local branch.

> If I accidentally make changes to master, and I try to pull from 
> origin, it says it's already up to date. I assumed origin was 
> supposed to be at, so does that mean I accidentally 
> made my local master the origin? Is there even such a thing as a 
> local master?

I *think* origin is the name of the top-level remote tracking branch.
So, every remote tracking branch will have a name beginning with
origin: origin/master, origin/web, origin/dev/kainhofer, etc.

The "already up to date" means that all of your remote tracking
branches reflect the current state of the branches at,
and that your local branch has been updated accordingly.

Depending on the way you set up your git repo ("git clone" versus "git
remote ..."), you may not have a local master branch.  You can check
by running "git branch" and seeing if master is in the list.

This is what my output looks like:

$ git branch
* pmccarty

> And how do I exit the EDIT_COMMITMSG window? I've included an 
> image showing the window. If I click on the X button, the whole 
> git bash shell closes along with it. That can't be right. And when 
> did my lily-local get ahead of origin/master by 47 commits?

You are inside of Vim.  To exit Vim without saving changes, type


Sorry if you already knew this, but just overlooked the fact that you
were using Vim.

Looking at the "git commit" man page, I see that you can change the
editor by modifying the GIT_EDITOR environmental variable.  You might
consider doing this if you don't want to use Vim.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]