git - Untracked and changed files are the same -
how can git tell me has changed if it's not tracked? , how can deleted, when it's discovered untracked?:
$ git status on branch updated-code-foundation branch ahead of 'origin/updated-code-foundation' 16 commits. (use "git push" publish local commits) changes committed: (use "git reset head <file>..." unstage) deleted: component/portal/src/joppli/acl/aclinterface.php deleted: container/php-apache/config/apache/default.conf deleted: container/php-apache/config/php/php.ini untracked files: (use "git add <file>..." include in committed) component/portal/src/joppli/acl/aclinterface.php container/php-apache/config/
i solve git add .
( no commit needed... )
- why occurring?
- how can prevent occurring?
1. scenario following:
- you have file tracked , committed repository
- you
git rm
file - file created again
example:
git add myfile git commit -m "myfile" git rm myfile echo test > myfile git status changes committed: (use "git reset head <file>..." unstage) deleted: myfile untracked files: (use "git add <file>..." include in committed) myfile
2. not sure how prevent it, depends on files. files auto generated , committed them mistake, , tried erase them.
possibly belong in .gitignore
?
Comments
Post a Comment