I want to change the branch in Git local. git checkout -b 1.3-master, but the local source is still there.

Asked 2 years ago, Updated 2 years ago, 45 views

hkef@BATMAN ~/Sites/meteor/sandbox/simple-todos-react [master]
± ± % git branch                                                                                             
* * master

hkef@BATMAN ~/Sites/meteor/sandbox/simple-todos-react [master]
± ± % git branch -r                                                                                          
  origin/1.3-master
  origin/HEAD -> origin/master
  origin/master

hkef@BATMAN ~/Sites/meteor/sandbox/simple-todos-react [master]
± ± % git checkout 1.3-master                                                                                  
Branch 1.3-master set up to track remote branch 1.3-master from origin.
Switched to a new branch '1.3-master'

hkef@BATMAN ~/Sites/meteor/sandbox/simple-todos-react [1.3-master]
± ± % git branch                                                                                               
* * 1.3-master
  master

hkef@BATMAN ~/Sites/meteor/sandbox/simple-todos-react [1.3-master]
± ± % l                                                                                                         
total 496
drwxr-xr-x  12 hkef  staff   408B Apr  5 14:45 .
drwxr-xr-x  28 hkef  staff   952B Apr  5 13:59 ..
drwxr-xr-x  13 hkef  staff   442B Apr  5 14:45 .git
-rw-r--r--   1 hkef  staff    14B Apr  5 14:45 .gitignore
drwxr-xr-x  10 hkef  staff   340B Apr  5 14:45 .meteor
-rw-r--r--   1 hkef  staff   1.2K Apr  5 14:45 LICENSE
-rw-r--r--   1 hkef  staff   438B Apr  5 14:45 README.md
drwxr-xr-x   5 hkef  staff   170B Apr  5 14:45 client
drwxr-xr-x   5 hkef  staff   170B Apr  5 14:45 imports
-rw-r--r--   1 hkef  staff   282B Apr  5 14:45 package.json
-rw-r--r--   1 hkef  staff   228K Apr  5 13:59 screenshot.png
drwxr-xr-x   3 hkef  staff   102B Apr  5 14:45 server

hkef@BATMAN ~/Sites/meteor/sandbox/simple-todos-react [1.3-master]
± ± % git checkout -b 1.3-master                                                                                 
fatal: A branch named '1.3-master' already exists.

git checkout branch

2022-09-22 21:54

2 Answers

git fetch

I have to... You asked yourself a question


2022-09-22 21:54

git checkout -b 1.3-master origin/1.3-master

Can't we do this?


2022-09-22 21:54

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.