【git】fatal: This operation must be run in a work tree
2014-03-16 20:49
639 查看
之前是这么弄的 /article/3669193.html ,感觉思路还是不太清晰。
今天新建立一个工程,需要一个仓库。
用git --bare init创建的empty的仓库,不能git add,
会会报错fatal: This operation must be run in a work tree 。
但是,据说用git init的可以。
解决办法有几个,
参考 http://blog.sina.com.cn/s/blog_630bf12f0100nl7i.html
参考 http://stackoverflow.com/questions/1456923/why-am-i-getting-the-message-fatal-this-operation-must-be-run-in-a-work-tree
===============
我选用的是:
仓库用git --bare init,
而我的实际的工程目录下用git init,git remote add origin ,git add 某个文件,git commit ,git push之后,
远程的仓库就ok了。
用gitweb也可以顺利的看到。
==================
今天新建立一个工程,需要一个仓库。
用git --bare init创建的empty的仓库,不能git add,
会会报错fatal: This operation must be run in a work tree 。
但是,据说用git init的可以。
解决办法有几个,
参考 http://blog.sina.com.cn/s/blog_630bf12f0100nl7i.html
参考 http://stackoverflow.com/questions/1456923/why-am-i-getting-the-message-fatal-this-operation-must-be-run-in-a-work-tree
===============
我选用的是:
仓库用git --bare init,
而我的实际的工程目录下用git init,git remote add origin ,git add 某个文件,git commit ,git push之后,
远程的仓库就ok了。
用gitweb也可以顺利的看到。
==================
相关文章推荐
- [git] fatal: This operation must be run in a work tree
- [git] fatal: This operation must be run in a work tree
- git 错误 fatal: This operation must be run in a work tree
- Git Bash出现 fatal: This operation must be run in a work tree
- [git] fatal: This operation must be run in a work tree
- cocos2d 安装出现Error: This script must be run as root in order to copy templates to /Library/Applicatio
- cocos2d安装出现Error: This script must be run as root in order to copy templates to /Library/Application
- Fatal Error[e72]: Segment INTRAMEND_REMAP must be defined in a segment definition option (-Z, -b or
- ORA-02069: global_names parameter must be set to TRUE for this operation
- Eclipse启动时报错:A Java RunTime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse. No java virtual machine was found after searching the following locations:…
- linux - Must my pidfile be located in /var/run? - Stack Overflow
- 使用Git 出现 Another git process seems to be running in this repository...
- 关于:ORA-02069: global_names parameter must be set to TRUE for this operation
- Eclipse配置问题:Error :- java runtime environment JRE or java development kit must be available in order to run eclipse
- git 提交失败git error Another git process seems to be running in this repository
- Eclipse启动时报错:A Java RunTime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse. No java v
- A Java RunTime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Ecl
- VC中改变PE文件中Dos Stub程序(显示This program cannot be run in DOS mode)那一段程序.
- A Java RunTime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Ecl
- DateTimePicker 控件出现 "You must be in ShowCheckbox mode to set to this date" 的错误