Skip to content
This repository has been archived by the owner on Mar 17, 2024. It is now read-only.

Commit

Permalink
Create gitignore.md
Browse files Browse the repository at this point in the history
  • Loading branch information
3amyatin authored Dec 1, 2023
1 parent c63e96d commit 4c02c9a
Showing 1 changed file with 93 additions and 0 deletions.
93 changes: 93 additions & 0 deletions git/gitignore.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Gitignore
https://git-scm.com/docs/gitignore
https://help.github.com/en/github/using-git/ignoring-files
https://github.com/github/gitignore

```
file_pattern_to_exclude >> .gitignore
nano .gitignore 
nano .git/info/exclude
git rm –cached <filename> # stop tracking the file 
git rm -r --cached . 
git ls-files --ignored --exclude-standard
git ls-files --ignored --exclude-standard | sed 's/.*/"&"/' | xargs git rm -r --cached
 
git add . 
git commit -m ".gitignore: added …, removed …, changed …" 
git ls-files --other --directory #list of ignored files 
git push
```

## Whitelisting
https://jasonstitt.com/gitignore-whitelisting-patterns
```
# typical
*
!*/
*/some/dir3/**
!.gitignore
# for all dir content
/*
!/whitelisteddir1
!/whitelisteddir2
!.gitignore
# to track only the dir but not the files in it
*
!.gitignore
```


## Windows user profile
```
.bash_history
ntuser*
Application Data/
Anwendungsdaten/
Cookies/
Documents/My Music/
Documents/My Pictures/
Documents/My Videos/
Local Settings/
Lokale Einstellungen/
My Documents/
NetHood/
Netzwerkumgebung/
PrintHood/
Druckumgebung/
Recent/
SendTo/
Start Menu/
Startmenü/
Templates/
Vorlagen/
Appdata/
Eigene Dateien/
Downloads/
Favorites/
Links/
Searches/
*.log
desktop.ini
.ssh/id_rsa*
.ssh/known_hosts
```




0 comments on commit 4c02c9a

Please sign in to comment.