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

Switching between branches

From
PRPavel Roskin <proski@gnu.org>
Date
Apr 21, 2005, 01:42 UTC
Message-ID
<1114047759.20044.22.camel@dv>
Hello!

Perhaps it's a naive question, but how do I switch between branches? I mean an equivalent of "svn switch" or "cvs update -r branch" that would reuse the existing working directory.

I tried to switch a git-pasky working directory to the linus branch.
Here's what I tried:

git track linus git cancel git pull git cancel git merge linus git cancel

After all that I found that README is still from the pasky branch.

Then I tried "git merge -b pasky linus" - this actually changed the files to the linus branch, but it didn't remove files specific to git-pasky. Also, I'm surprised that I had to specify "-b pasky", as if the currently checked out branch is unknown.

I'm using git-pasky 0.6.2.
-- 
Regards,
Pavel Roskin
Next: Petr Baudis
Message 1 of 4 in “Switching between branches”
  1. Pavel RoskinApr 21, 2005
  2. Petr BaudisApr 21, 2005
  3. Matthias UrlichsApr 21, 2005
  4. Petr BaudisApr 21, 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.