git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Use of the -f flag on checkout

From
Alan Chandler <alan@chandlerfamily.org.uk>
Date
Sep 29, 2005, 06:54 UTC
Message-ID
<200509290754.30017.alan@chandlerfamily.org.uk>
In-Reply-To
<7vbr2cmle2.fsf@assigned-by-dhcp.cox.net>
On Thursday 29 Sep 2005 07:35, Junio C Hamano wrote:
Show 14 quoted lines
> Jeff Garzik <jgarzik@pobox.com> writes:
> > My question:  is this the best/right way to pull one branch into
> > another?  It's been working for me, for months, but...
>
> Yes, that is how 'resolve' is designed to work.
>
> You could instead use standard 'git pull' from the local
> repository.  Here is what I usually do in git.git repository:
>
>     $ git checkout foo
>     $ ... work in foo "topic" branch
>     $ git checkout bar
>     $ ... work in bar "topic" branch
>     $ git checkout pu
I notice that Jeff is using the -f flag on checkout whereas you don't.

What is the risk in not using it (ie what are the cases when you should use it)?

-- 
Alan Chandler
http://www.chandlerfamily.org.uk
Previous: Junio C HamanoNext: Matthias Urlichs
Message 3 of 7 in “Pull from one branch to another?”
  1. Jeff GarzikSep 29, 2005
  2. Junio C HamanoSep 29, 2005
  3. Use of the -f flag on checkoutAlan Chandler, Sep 29, 2005
  4. Matthias UrlichsSep 29, 2005
  5. Junio C HamanoSep 29, 2005
  6. Junio C HamanoSep 29, 2005
  7. Tony LuckSep 29, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.