Skip to content

Commit 4d5168b

Browse files
Merge pull request #2 from maximillianus/master
add gitignore
2 parents 32dbd0a + ab85f8f commit 4d5168b

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* [Menghapus file](https://github.com/datascienceid/README#menghapus-file)
77
* [Branching](https://github.com/datascienceid/README#branching)
88
* [Perintah tambahan](https://github.com/datascienceid/README#perintah-tambahan)
9+
* [gitignore](https://github.com/datascienceid/README#gitignore)
910

1011
## Mengunduh Repository
1112

@@ -280,3 +281,40 @@ Dapatkan log dari sebuah repository
280281
```
281282
git log
282283
```
284+
285+
## gitignore
286+
Ada kalanya kita melihat file gitignore di suatu repository. Apakah itu gitignore? gitignore adalah file yang berisi instruksi kepada git repository untuk tidak men-track files tertentu. Ini sangat berguna untuk meng-exclude files yang mungkin tidak berguna atau tidak perlu di push ke repository. Contoh: .DS_Store di Mac, binary files, `__pycache__`, etc.
287+
288+
File gitignore dimulai dengan titik (`.`) di Unix-based system (Mac dan Linux) untuk menandakan dia adalah hidden file. Di Windows, buat file gitignore dengan memberi nama `.gitignore.`.
289+
290+
#### Contoh
291+
292+
Untrack file tertentu
293+
```
294+
# tagar digunakan untuk commenting
295+
# Mac
296+
.DS_Store
297+
298+
# Spreadsheet
299+
*.xls
300+
*.xlsx
301+
302+
# Compressed file
303+
*.zip
304+
*.rar
305+
*.gz
306+
```
307+
308+
Untrack folder tertentu
309+
```
310+
# tagar digunakan untuk commenting
311+
# python
312+
__pycache__/
313+
314+
# virtual environment
315+
env/
316+
venv/
317+
```
318+
319+
Contoh koleksi gitignore yang berguna
320+
https://github.com/github/gitignore

0 commit comments

Comments
 (0)