I cloned a repo with git yesterday and ran out of space on my VMs HDD. I've since moved the repo and have enough space. git clone
ran out of space during unpacking the downloaded objects. The thing is, git thinks it's up to date, but git status
lists pages of deleted files.
Git pull doesn't work as it thinks it's up to date. What can I do so I don't have to clone the entire repository again?
There is currently no way to resume a git clone using git, but there is a neat trick you can use instead of cloning directly -- using git bundle files. Here is how you would do it. Once this is done, you can delete the "clone. bundle" file, unless you think you will need to perform a fresh clone again in the future.
git clone --bare origin-url : You will get all of the tags copied, local branches master (HEAD) , next , pu , and maint , no remote tracking branches. That is, all branches are copied as is, and it's set up completely independent, with no expectation of fetching again.
Try:
git reset --hard HEAD
This should update your working copy.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With