Cara membuat global .gitignore

file .gitignore bertujuan untuk agar git mengacuhkan file-file yang memiliki pola yang sesuai dengan isi dari .gitignore. Untuk membuat .gitignore yang berlaku global ikuti langkah-langkah berikut :

#1 Buka terminal

#2 Pindah ke folder home

cd ~

#3 Buat/buka file .gitignore_global

gedit .gitignore_global

#4 Isi file .gitignore_global dengan pola yang akan diabaikan. Contoh isi file .gitignore (buat developer OpenERP bisa dicontek langsung :D):


# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
*.pyc

.*

# Packages #
############
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip


# Logs and databases #
######################
*.log
*.sql
*.sqlite


# OS generated files #
######################
.DS_Store*
ehthumbs.db
Icon?
Thumbs.db

# Jalankan git config --global core.excludesfile ~/.gitignore_global pada terminal

2 thoughts on “Cara membuat global .gitignore

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s