嗨不同,我想切換到一個特定的分支,part1-es6
的Git分支內容從遠程
,但是,當我克隆此回購和結帳這個分支,文件列表不同,我在做什麼錯誤。另外,git branch
不列出任何!除了主人。
bsr[~/tmp] $ git clone https://github.com/jlongster/backend-with-webpack.git
Cloning into 'backend-with-webpack'...
remote: Counting objects: 106, done.
remote: Total 106 (delta 0), reused 0 (delta 0), pack-reused 106
Receiving objects: 100% (106/106), 88.28 KiB | 0 bytes/s, done.
Resolving deltas: 100% (41/41), done.
Checking connectivity... done.
bsr[~/tmp] $ git branch
fatal: Not a git repository (or any of the parent directories): .git
bsr[~/tmp] $ cd backend-with-webpack/
bsr[~/tmp/backend-with-webpack] [master] $ git branch
* master
bsr[~/tmp/backend-with-webpack] [master] $ git checkout -b part1-es6
Switched to a new branch 'part1-es6'
bsr[~/tmp/backend-with-webpack] [part1-es6] $ ls
README.md build gulpfile.js package.json src static
bsr[~/tmp/backend-with-webpack] [part1-es6] $
我認爲你正在創建一個新的brach而不是從遠程repo獲取part-es6。 –