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

Re: git branch --switch?

From
RHRene Herman <rene.herman@gmail.com>
Date
Apr 17, 2007, 16:10 UTC
Message-ID
<4624F18F.6070906@gmail.com>
In-Reply-To
<8c5c35580704170855ke426d86vac6e9b3b67fea5ea@mail.gmail.com>
On 04/17/2007 05:55 PM, Lars Hjemli wrote:
> On 4/17/07, Rene Herman <rene.herman@gmail.com> wrote:
Show 16 quoted lines
>> git clone -l -s -n <a local linux repo> local
>> git checkout -b v20 v2.6.20
>> git branch a
>> git branch b
>> git branch c
>>
>> Step 1, 3, 4 and 5 of this are nearly instantaneous but 2 isn't
> 
> I might have misunderstood your goal, but have you tried
> 
> git clone -l -s -n <a local linux repo> local
> git branch a v2.6.20
> git branch b a
> git branch c a
> 
> Now a, b and c all point at v2.6.20, while HEAD points as master.
Well, yes, they do, and I could also do

git branch b v2.6.20 git branch c v2.6.20

directly then (right?) but I do want that "v20" branch in the middle. The cloned repo is a linus repo, and that v20 is where I'll be pulling 2.6.20.y updates into; a merge branch will then merge v20, a, b and c into what I will be compiling.

As said, given that I need to checkout things anyway to do something with them it'a all not essential but as a newbie, I just thought that a "branch --and-set-as-current new_branch" made sense. My sense of sense may be crap; I've largely avoided dealing with souce code management, regarding CVS and SVN as unfortunate facts of life to work around and forget, mostly.

Rene.
Previous: Lars HjemliNext: Randal L. Schwartz
Message 11 of 18 in “git branch --switch?”
  1. Rene HermanApr 17, 2007
  2. Alex RiesenApr 17, 2007
  3. Rene HermanApr 17, 2007
  4. Brian GernhardtApr 17, 2007
  5. Alex RiesenApr 17, 2007
  6. Rene HermanApr 17, 2007
  7. Brian GernhardtApr 17, 2007
  8. Rene HermanApr 17, 2007
  9. Rene HermanApr 17, 2007
  10. Lars HjemliApr 17, 2007
  11. Rene HermanApr 17, 2007
  12. Randal L. SchwartzApr 17, 2007
  13. Rene HermanApr 17, 2007
  14. Lars HjemliApr 17, 2007
  15. Rene HermanApr 17, 2007
  16. Rene HermanApr 17, 2007
  17. Linus TorvaldsApr 17, 2007
  18. Rene HermanApr 17, 2007

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.