https://kotlinlang.org logo
#getting-started
Title
# getting-started
r

Ryan Zidago

01/15/2022, 4:55 PM
Do you usally commit or ignore those files?
Copy code
.gradle/
	.idea/
	bin/
	build/
	gradle/
	gradlew
	gradlew.bat
r

Rob Elliot

01/15/2022, 4:59 PM
IDE & O/S specific files like
.idea/
should be in a global ignore file in your home directory. I use
~/.gitignore_global
- add this to `~/.gitconfig`:
Copy code
[core]
	excludesfile = ~/.gitignore_global
🙌 3
gradle/
,
gradlew
&
gradlew.bat
should be checked in - the whole point is you can checkout and run
./gradlew build
and it works.
🙌 1
r

Ryan Zidago

01/15/2022, 5:00 PM
Thanks Rob!
r

Rob Elliot

01/15/2022, 5:00 PM
Anything created by the build should be in
.gitignore
- so definitely
build
.
🙌 1
There are a couple of things it can be worth checking in from the
.idea
directory - I have the following in `~/.gitignore_global`:
Copy code
!.idea/runConfigurations
!.idea/runConfigurations/*
!.idea/externalDependencies.xml
which allows me to save required plugins and special run configurations, which may be useful to other people using IntelliJ without having an endless fight over personal configuration. For instance in a project using kotest I think it's useful to prompt another dev to install the kotest plugin. And when running the app in Intellij requires specific VM or program parameters it's useful to save that as a run configuration.
r

Ryan Zidago

01/15/2022, 5:16 PM
Thanks. For now on, I'm working alone, but it's always good to know 😉
a

Albert Chang

01/15/2022, 5:28 PM
gitignore.io is a handy tool.
👍 1
r

Ryan Zidago

01/15/2022, 5:30 PM
Nice! I've never heard of that but will definitely look into it in the future.
3 Views