I ran git pull
on my local branch to pull new branch but with error:
warning: There are too many unreachable loose objects; run 'git prune' to remove them.
Then I checkout
'ed to new branch anyway but every files disappeared. I tried running git prune
, git gc
and deleting .git/.gc_log but no luck.
➜ gerege git:(nissan) git status
On branch nissan
Your branch is up-to-date with 'origin/nissan'.
nothing to commit, working directory clean
➜ gerege git:(nissan) git pull
Username for 'https://git.nmma.co': khangarid.d@nmma.co
Password for 'https://khangarid.d@nmma.co@git.nmma.co':
remote: Counting objects: 73, done.
remote: Compressing objects: 100% (71/71), done.
remote: Total 73 (delta 31), reused 0 (delta 0)
Unpacking objects: 100% (73/73), done.
From https://git.nmma.co/Gerege/gerege
db33f62..2ec26ab discovermongolia -> origin/discovermongolia
* [new branch] ecrc -> origin/ecrc
a286063..a05fbb9 master -> origin/master
Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.
error: The last gc run reported the following. Please correct the root cause
and remove .git/gc.log.
Automatic cleanup will not be performed until the file is removed.
warning: There are too many unreachable loose objects; run 'git prune' to remove them.
Already up-to-date.
➜ gerege git:(nissan) git checkout ecrc
Branch ecrc set up to track remote branch ecrc from origin.
Switched to a new branch 'ecrc'
➜ gerege git:(ecrc) gco master
Switched to branch 'master'
Your branch is behind 'origin/master' by 7 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)