“.gitignore” Ответ

Гитиньоре

Use this link as a generator for your gitignore: "https://www.toptal.com/developers/gitignore"
Just enter your language/IDE and press tab if you want to add another one. 
Once your done with that press "Create" and copy the text into your gitignore
Fancy Flatworm

.gitignore

node_modules
.DS_Store
.env
Indian Porcupine

Как поместить файлы в gitignore

$ echo debug.log >> .gitignore
$ git rm --cached debug.log
rm 'debug.log'
$ git commit -m "Start ignoring debug.log"
Vivacious Vicuña

! .gitignore

    $ cat .gitignore
    vmlinux*
    $ ls arch/foo/kernel/vm*
    arch/foo/kernel/vmlinux.lds.S
    $ echo '!/vmlinux*' >arch/foo/kernel/.gitignore
Adventurous Anaconda

.gitignore

*.log
build/
temp-*
Poised Pony

Гитиньоре

# you might want to hide all the files, this helps if you don't want '.gitignore' showing up in your repo
https://luisdalmolin.dev/blog/ignoring-files-in-git-without-gitignore/#:~:text=To%20ignore%20untracked%20files%2C%20you,tracking%20any%20(untracked)%20file.

# in terminal within the project directory
open .git/info/exclude 

# file opens as below with example

# git ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# For a project mostly in C, the following would be a good set of
# exclude patterns (uncomment them if you want to use them):
# *.[oa]
# *~
example-1.py
example-2.py
example-3.py
example-4.py

# when you use: git add .
# example 1 to 4 files will be ignored
Manga301

Ответы похожие на “.gitignore”

Смотреть популярные ответы по языку

Смотреть другие языки программирования