An extremely simple go CLI to hit the gitignore API with whatever you pass as command line arguments. The list of things you can pass here are documented on gitignore.io.
You'll get back a .gitignore file saved to $CWD/.gitignore
with the contents generated from the API.
brew tap FollowTheProcess/homebrew-tap
brew install FollowTheProcess/homebrew-tap/goignore
Or download the correct binary for your OS and ARCH from the GitHub Releases 😁
Inside the folder you want the .gitignore
to live in, run:
goignore macos vscode go
This will get you a .gitignore
file that looks like...
# Created by https://www.toptal.com/developers/gitignore/api/macos,vscode,go
# Edit at https://www.toptal.com/developers/gitignore?templates=macos,vscode,go
### Go ###
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
# Test binary, built with `go test -c`
*.test
# Output of the go coverage tool, specifically when used with LiteIDE
*.out
# Dependency directories (remove the comment below to include it)
# vendor/
### Go Patch ###
/vendor/
/Godeps/
### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
### vscode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace
# End of https://www.toptal.com/developers/gitignore/api/macos,vscode,go
If you're not sure what you can type in check on gitignore.io or run:
goignore --list
And you'll see something like...
1c,
1c-bitrix,
a-frame,
actionscript,
ada
adobe,
advancedinstaller,
adventuregamestudio,
agda,
al
# etc.
If you have a particular thing in mind:
goignore --list | grep visualstudiocode
visualstudiocode
When in doubt, run:
goignore --help