错误被杀:在命令“git add。”之后9。

时间:2017-05-13 15:46:39

标签: django git virtualenv

当我执行“git add”时遇到问题。我收到错误消息“Killed:9”。如果我再试一次“git add”。我收到了另一个错误:

致命:无法创建'./crmeasy/.git/index.lock':文件存在。

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 then try again. 
If it still fails, a git process may have crashed in this 
repository earlier: remove the file manually to continue.

如果我删除./.git/index.lock文件并再试一次,我会收到相同的错误周期。 我尝试提交新的空Django项目virtualenv目录。我怎么能解决这个问题?

1 个答案:

答案 0 :(得分:5)

如果你要将你的virtualenv添加到git,就会发生这种情况。

解决方案:在version: '3' services: maria_service: build: ./db_maria restart: always environment: MYSQL_DATABASE: mariadb MYSQL_USER: joel MYSQL_PASSWORD: password MYSQL_ROOT_PASSWORD: password volumes: - ./db:/var/lib/mysql drupal_service: build: ./website restart: always ports: - 8080:80 volumes: - /var/www/html/modules - /var/www/html/profiles - /var/www/html/themes # this takes advantage of the feature in Docker that a new anonymous # volume (which is what we're creating here) will be initialized with the # existing content of the image at the same location - /var/www/html/sites depends_on: - maria_service environment: DB_HOST: maria_service DB_USER: joel DB_PASSWORD: password DB_NAME: mariadb DB_DRIVER: mysql 文件中添加virtualenv的路径。 现在你可以.gitignore