New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.gitignore: Remove cruft and editor/OS-specific ignore files #21458
Labels
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
Comments
seems sane to me to keep only the repo specific ones |
If .DS_Store will be removed i think .nfs.* , *.swp would fall into the removal category of os/env specific files too. |
Change https://golang.org/cl/55871 mentions this issue: |
gopherbot
pushed a commit
that referenced
this issue
Aug 15, 2017
This effectively reverts https://golang.org/cl/53770 and adds a guide on what not to add in this file. Update #21458 Change-Id: I7c740d492b70628b5d9f9e1622014995a3f6f8ec Reviewed-on: https://go-review.googlesource.com/55871 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Is there anything else to do here? |
ianlancetaylor
added
the
NeedsFix
The path to resolution is known, but the work has not been done.
label
Mar 30, 2018
We still have .DS_Store which @kevinburke wanted to remove. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's the current contents of the
.gitignore
file for the Go project.Many of those, like
.idea
and.DS_Store
, are not specific to the Go project - they're specific to a user's environment or to an OS. There are large number of user-specific files that get placed in directories that we might need to exclude; we can't enumerate the list, and it also seems useful to teach users how to solve this problem for themselves.Git has a tool for dealing with files you'd like to (privately) ignore. You can edit the
.git/info/exclude
file to privately ignore any files you don't want to commit to the project. You can also create a global.gitignore
file for your computer to ignore those files in every Git repository on your machine, described here: https://help.github.com/articles/ignoring-files/#create-a-global-gitignore.Finally, you can create a Git template to automatically populate the contents of
.gitignore
whenever a new Git repository is created, as described here: https://stackoverflow.com/a/16658321/329700I'd like to propose that we put the above instructions in the
.gitignore
file and then remove all of the user and OS-specific ignore directives; the ignore file should only include artifacts that are generated by the Go project that we'd rather not check in.The text was updated successfully, but these errors were encountered: