The first thing to check after a fresh clone is:
git status
git log --oneline --graph --decorate -10
That will give you an idea of the branch on you are one, and the commit you are seeing (and its 9 parent commits)
As mentioned by the OP:
I had initially forked the repo, and was trying to update my local repo.
But since no change had occurred in that one, nothing could be pulled.
In that case, typically, see "Git working fork with updates": you would rebase your local branch on top of upstream/master
.
I just cloned kaldi-asr/kaldi
on my Windows 10 laptop, using Git 2.13, and I do see some errors:
D:\git>git clone https://github.com/kaldi-asr/kaldi
Cloning into 'kaldi'...
remote: Counting objects: 83872, done.
remote: Compressing objects: 100% (35/35), done.
remote: Total 83872 (delta 8), reused 19 (delta 5), pack-reused 83832
Receiving objects: 100% (83872/83872), 105.24 MiB | 512.00 KiB/s, done.
Resolving deltas: 100% (65063/65063), done.
error: unable to create file egs/babel/s5d/results/kws_results.104-pashto.flp.marcc2.conf.jtrmal1@jhu.edu.2016-03-31T11:34:24-04:00: Invalid argument
error: unable to create file egs/babel/s5d/results/kws_results.305-guarani.flp.marcc.conf.jtrmal1@jhu.edu.2016-03-31T12:04:03-04:00: Invalid argument
error: unable to create file egs/babel/s5d/results/kws_results.306-igbo.flp.marcc.conf.jtrmal1@jhu.edu.2016-03-31T12:12:45-04:00: Invalid argument
error: unable to create file egs/babel/s5d/results/kws_results.307-amharic.flp.marcc.conf.jtrmal1@jhu.edu.2016-03-31T12:21:34-04:00: Invalid argument
...
And git status shows everything deleted:
D:\git\kaldi>git st
On branch master
Your branch is up-to-date with 'origin/master'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
deleted: .gitattributes
deleted: .gitignore
deleted: .travis.yml
deleted: COPYING
deleted: INSTALL
A git reset --hard
fails to improve the situation:
D:\git\kaldi>git reset --hard
error: unable to create file egs/babel/s5d/results/kws_results.104-pashto.flp.marcc2.conf.jtrmal1@jhu.edu.2016-03-31T11:34:24-04:00: Invalid argument
error: unable to create file egs/babel/s5d/results/kws_results.305-guarani.flp.marcc.conf.jtrmal1@jhu.edu.2016-03-31T12:04:03-04:00: Invalid argument
error: unable to create file egs/babel/s5d/results/kws_results.306-igbo.flp.marcc.conf.jtrmal1@jhu.edu.2016-03-31T12:12:45-04:00: Invalid argument
error: unable to create file egs/babel/s5d/results/kws_results.307-amharic.flp.marcc.conf.jtrmal1@jhu.edu.2016-03-31T12:21:34-04:00: Invalid argument
...
Checking out files: 100% (5243/5243), done.
fatal: Could not reset index file to revision 'HEAD'.
Some files remains impossible to checkout because they include characters which are not compatible with the Windows filesystem.
Namely the ':
' one.
If I add:
D:\git\kaldi>git config core.sparsecheckout true
D:\git\kaldi>echo !results/ > .git/info/sparse-checkout
D:\git\kaldi>echo /* >> .git/info/sparse-checkout
Then a git reset --hard
does work!
I just tested a sparse clone, and it works too:
D:\git>git init kaldi2
Initialized empty Git repository in D:/git/kaldi2/.git/
D:\git>cd kaldi2
D:\git\kaldi2>git remote add origin https://github.com/kaldi-asr/kaldi
D:\git\kaldi2>git config core.sparsecheckout true
D:\git\kaldi2>echo !results/ > .git/info/sparse-checkout
D:\git\kaldi2>echo /* >> .git/info/sparse-checkout
D:\git\kaldi2>git pull origin master