Subject: Re: Pull from one branch to another?

From: Tony Luck <[email-masked]>
Date: Thu, 29 Sep 2005 10:52:10 -0700

On 9/28/05, Jeff Garzik <[email-masked]> wrote:

>         $ git checkout -f sky2
...
>         $ git checkout -f upstream
...
>         $ git checkout -f ALL

Those "-f" arguments to git checkout shouldn't be needed, and may
eventually cause a problem.  The "-f" option doesn't quite work as
"forcibly" as you might think it does because it ignores the index, and
so doesn't do what you[1] expect with files that exist in the previously
checked out tree, and not in the new tree ... it won't delete them, so
there's a small risk that with the wrong git operation you may
accidentally add them to the new branch.

In the sequence you described a simple "git checkout" should do the
right thing ... and will be faster too.

-Tony

[1] well what *I* expected, and was part of a snafu I made earlier