Reputation: 58662
Hi I wanted to switch to a specific branch, part1-es6
but, when I clone this repo and checkout this branch, the files list differently, what am I doing wrong. Also, git branch
doesn't list any!! other than master.
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] $
Upvotes: 0
Views: 44
Reputation: 3260
try git checkout -t origin/part1-es6
after you clone the repository.
Upvotes: 1