Skip to content

Instantly share code, notes, and snippets.

@octocat
Created February 27, 2014 19:38
Show Gist options
  • Save octocat/9257657 to your computer and use it in GitHub Desktop.
Save octocat/9257657 to your computer and use it in GitHub Desktop.
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# 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
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
@jgphilpott
Copy link

jgphilpott commented Mar 25, 2022

This is great thanks! Also some more good stuff here: https://github.com/github/gitignore

@martin-braun
Copy link

martin-braun commented Apr 5, 2022

@elijahr2411 No, this is not for specific environments / frameworks / IDEs, this is very broad on purpose, only featuring files that must not be committed under any circumstances, such as OS specific system files or compiled / compressed files.

Use this and combine it with one of those: https://github.com/github/gitignore (thanks for the link, @jgphilpott)

@Latrice4u
Copy link

Latrice4u commented Apr 5, 2022 via email

@Tr1985
Copy link

Tr1985 commented Apr 14, 2022

Chúng ta có thể bỏ qua tệp web.Config bằng tệp gitignore không

@kimfom01
Copy link

lol thanks

@Julioarita
Copy link

Totally usefull!!

@Alipatiras
Copy link

سلام ،من فکر می کنم ،هر گاه می‌خواهم پروفایل را باز کنم تا اطلاعاتم را وارد کنم به جایی جز همانی که می خواهم هدایت می شوم چند مورد اتفاق افتاده که متوجه کلاهبرداری شده ام و دیگر ادامه ندادم چگونه ایمن کنم

@67788804
Copy link

67788804 commented Aug 8, 2022

c'est Bon vraiment.merci beaucoup

@olami1223
Copy link

Uploading ABAC4D6F-F69A-4637-812D-7802D2FD9B51.jpeg…

@MdMohsin98
Copy link

So basically the files with these extensions would be ignored(will not compile). How can I specify only the files that should be compiled?

@SIunits
Copy link

SIunits commented Dec 25, 2022

Very useful

@vinyll
Copy link

vinyll commented Dec 25, 2022

Hey, you should consider not setting this file in your projet but in your profile.
The gitignore file within your project should be specific to your project, its language, framework…
Anything that is specific to your code editor, you OS… should be out of that scope.
See http://vinyll.scopyleft.fr/using-gitignore-the-right-way/ for further understanding.

@Limlouis097
Copy link

little late but __pycache__ might be a good addition

@Limlouis097
Copy link

little late but __pycache__ might be a good addition

@iollmann
Copy link

iollmann commented Jan 19, 2023

It is often useful to add xcuserdata to avoid having one user's machine randomly perturb Xcode debugging switches every time there is a git pull, or to be alerted that changing that stuff will necessitate a push. We also don't really need to see our collaborators xcuserdata.

@Artem9444
Copy link

gitignore

@vinyll
Copy link

vinyll commented Jan 24, 2023

Anything that is specific to you OS, you editor or your workspace should be in your system’s home gitignore, not the project’s .gitignore.

The project´s .gitignore should remain clean with only file and path that are specific to the project itself, not your development environment.

Copy link

ghost commented Mar 5, 2023

I have created a fork to ignore these extra files:
*.pyo, *.pyc, *~, *.bak, and *.swp, here.

@renalupo
Copy link

renalupo commented Mar 6, 2023

ciao

@renalupo
Copy link

renalupo commented Mar 6, 2023

assort

@renalupo
Copy link

renalupo commented Mar 6, 2023

ciao

@renalupo
Copy link

renalupo commented Mar 6, 2023

ahooo

@67788804
Copy link

Hello

@rajdip20
Copy link

Thanks for the information.

@AddonGrp
Copy link

Thank´s

@SergeNoah000
Copy link

et si c'est pour un dossier ou un sous-dossier ?

@Klkl121aaaa
Copy link

It is often useful to add xcuserdata to avoid having one user's machine randomly perturb Xcode debugging switches every time there is a git pull, or to be alerted that changing that stuff will necessitate a push. We also don't really need to see our collaborators xcuserdata.

Klkl121aaaa

@Klkl121aaaa
Copy link

Qwqw12121a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment