Another git process seems to be running in this repository, e.g. an editor opened by'git commit'. Please make sure all processes are terminated thentry again. If it still fails, a git process may have crashed in this repository earlier: remove thefile manually to continue.
解决方法: 直接将.git目录下的index.lock文件删掉,然后重新执行上面的操作.
可是还会报错
1 2 3 4 5 6 7 8 9 10 11
takethat@acer ~/temp/vivatakethat.github.io/resume_takethat (gh-pages) λ git add . A s s e r t i o n f ai l e d !
P r o g r a m : D : \ P r o g r a m \ c m d e r \ v e n d o r \ g i t - f o r - w i n d o w s \ m i n g w 32 \ bi n \ g i t . e x e F i l e : pa t h s p e c . c , L i n e 317
E x p r e s s i o n : i t e m - > n o w i l d c a r d _ l e n < = i t e m - > l e n & & i t e m - > p r e f i x < = i t e m - > l e n
This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.
无解?
设置windows下git的home目录以及自动跳转
打开Git安装位置\etc\profile文件添加以下
1 2 3 4
HOME="D:\github\home" HOME="$(cd "D:\github\hexo-blog" ; pwd)" cd exportPATH="$HOME/bin:$PATH"
git remote add origin git@github.com:vivatakethat/vivatakethat.github.io.git git push -u origin master …or import code from another repository You can initialize this repository with code froma Subversion, Mercurial, or TFS project.