M
M
Mike Evstropov2016-07-16 00:35:47
git
Mike Evstropov, 2016-07-16 00:35:47

Why is Git not adding files?

[email protected] /var/www/git/MevSortableTreeBundle $ ls -a
.  ..  Controller  .git  MevSortableTreeBundle.php  Resources
[email protected] /var/www/git/MevSortableTreeBundle $ git add .
[email protected] /var/www/git/MevSortableTreeBundle $ git status
On branch master
nothing to commit, working directory clean

File permissions 777. Recreated the repository several times. Does not help.
[email protected] /var/www/git/MevSortableTreeBundle $ git ls-files
Controller/SortableTreeController.php
MevSortableTreeBundle.php
Resources/config/routing.yml
Resources/config/services.yml
Resources/views/Default/tree_up_down.html.twig

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
ManWithBear, 2016-07-16
@Aroused

Что git ls-files пишет?

P
Pavel K, 2016-07-16
@PavelK

Файл случайно не открыт на редактирование, а папки не пустые?
ну и попробуйте git check-ignore -v MevSortableTreeBundle.php

L
lykich, 2016-12-22
@lykich

Такое бывает если ниже по дереву есть еще один репозиторий git.
Пример в корне
git status
изменено: vendor/friendsofsymfony/user-bundle (изменено содержимое)
cd vendor/friendsofsymfony/user-bundle
git status
изменено: .gitattributes
изменено: .github/ISSUE_TEMPLATE.md
изменено: .gitignore
изменено: .php_cs
изменено: .travis.yml
изменено: Changelog.md
изменено: Command/ActivateUserCommand.php
изменено: Command/ChangePasswordCommand.php
изменено: Command/CreateUserCommand.php
rm .git
cd ../../../
git add -A - ОК.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question