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
foo
folder (the repo I wanted to copy) in same dir asfoo
locally. - Renamed the copied
foo(Copy)
tofooBar
locally. cd fooBar
and rangit remote rm origin
as 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
fooBar
repo like so:git remote add origin https://github.com/myteam/fooRepo.git
git push -u origin development
(Note that I useddevelopment
instead ofmaster
- I thoughtmaster
doesn't have any significance and is just a convention) - Finally I deleted my
fooBar
folder 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
.