I was attempting to copy foo repo into new fooBar repo. I am running into an error, here is what I did:
- Created a new blank repo on github called
fooBar - Manually created a copy of the
foofolder (the repo I wanted to copy) in same dir asfoolocally. - Renamed the copied
foo(Copy)tofooBarlocally. cd fooBarand rangit remote rm originas per How to remove origin from git repository (which might have been a mistake, because I am just using github, not git-svn)- Pushed my branch to my new remote
fooBarrepo like so:git remote add origin https://github.com/myteam/fooRepo.gitgit push -u origin development(Note that I useddevelopmentinstead ofmaster- I thoughtmasterdoesn't have any significance and is just a convention) - Finally I deleted my
fooBarfolder once I saw it has pushed to github successfully. I then tried pulling itgit clone https://github.com/myAccount/fooBar.git
I then get the following:
Cloning into 'fooBar'...
remote: Counting objects: 9297, done.
remote: Compressing objects: 100% (1727/1727), done.
remote: Total 9297 (delta 7542), reused 9297 (delta 7542), pack-reu
Receiving objects: 100% (9297/9297), 1.58 MiB | 253.00 KiB/s, done.
Resolving deltas: 100% (7542/7542), done.
warning: remote HEAD refers to nonexistent ref, unable to checkout.
I can't find an answer for the highlighted error when cloning - everyone seems to have a problem when deleting a remote branch and trying to pull it.
warning: remote HEAD refers to nonexistent ref, unable to checkout.
Note, in my new fooBar repo, development is the only branch and it's set Default.