Создать Gitignore
# creates gitignore file
$ touch .gitignore
sej
# creates gitignore file
$ touch .gitignore
git reset name_of_file
git rm -r --cached .
To exclude some files from git commit
-----------------------------------------------
syntax - git update-index --assume-unchanged <filepath>
example - git update-index --assume-unchanged default/config.php
To undo the above command
-----------------------------------------------
syntax - git update-index --no-assume-unchanged <filepath>
example - git update-index --no-assume-unchanged default/config.php
$ echo debug.log >> .gitignore
$ git rm --cached debug.log
rm 'debug.log'
$ git commit -m "Start ignoring debug.log"
just put the name or the path to your file in a .gitignore file, like this:
your_file.svg <-- ignore the file your_file.svg
*.sql <-- ignore any .sql files
ihm/test/ <-- ignore the whole "test" folder in "ihm"