aboutsummaryrefslogtreecommitdiffstats
path: root/community/Golang/Go.AllowList.gitignore
diff options
context:
space:
mode:
authorkuritka <kuritka@gmail.com>2021-12-07 16:50:54 +0100
committerkuritka <kuritka@gmail.com>2021-12-07 17:11:14 +0100
commit4e89ae30edecbbd49d72fb3a04142ca05b46f07e (patch)
tree2f71d61be3a6b227bfb3daec6268e8ba4c72c658 /community/Golang/Go.AllowList.gitignore
parent996b2a21b2c005a2eceae4beb1741e10c84f817c (diff)
downloadgitignore-4e89ae30edecbbd49d72fb3a04142ca05b46f07e.tar.gz
gitignore-4e89ae30edecbbd49d72fb3a04142ca05b46f07e.zip
Adding AllowList for Go
**Reasons for making this change:** _Allowlisting with .gitignore is a technique for dealing with source trees that can have various different untracked local files such as generated output, packages installed through package managers, “working” files, config for individual developers, etc. Rather than trying to come up with some master list of all possible untracked files and add them to .gitignore, it can be easier to start by ignoring everything and then add specific directories back._ _I think the requirements for software development are changing and there is a need to offer an alternative to the denylist._ - https://jasonstitt.com/gitignore-whitelisting-patterns - https://github.com/golang/go Signed-off-by: kuritka <kuritka@gmail.com>
Diffstat (limited to 'community/Golang/Go.AllowList.gitignore')
-rw-r--r--community/Golang/Go.AllowList.gitignore23
1 files changed, 23 insertions, 0 deletions
diff --git a/community/Golang/Go.AllowList.gitignore b/community/Golang/Go.AllowList.gitignore
new file mode 100644
index 00000000..a309a018
--- /dev/null
+++ b/community/Golang/Go.AllowList.gitignore
@@ -0,0 +1,23 @@
+# Allowlisting gitignore template for GO projects prevents us
+# from adding various unwanted local files, such as generated
+# files, developer configurations or IDE-specific files etc.
+#
+# Recommended: Go.AllowList.gitignore
+
+# Ignore everything
+*
+
+# But not these files...
+!/.gitignore
+
+!*.go
+!go.sum
+!go.mod
+
+!README.md
+!LICENSE
+
+# !Makefile
+
+# ...even if they are in subdirectories
+!*/