You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See the [source code](https://github.com/wakatime/wakatime-cli/blob/36f6372880d7113382e99453c2b94ff727788ae2/pkg/project/project.go#L145) for specifics.
8
+
## Config File
23
9
24
-
### WakaTime Project File
25
-
26
-
To overwrite the auto-detected project, create a `.wakatime-project` file in your project’s root folder.
27
-
The first line of the file contents overwrites the project name, if present.
28
-
The second line, if present, overwrites the current branch name when working inside this folder.
29
-
When the `.wakatime-project` file is empty, the folder’s name is used as the project name.
30
-
Whenever a `.wakatime-project` file is found, it overwrites all other project detection.
31
-
32
-
## INI Config File
33
-
34
-
Here's an example `$WAKATIME_HOME/.wakatime.cfg` config file with all available options:
10
+
After [installing WakaTime][plugins], a minimal `$WAKATIME_HOME/.wakatime.cfg` config file will be created for you.
11
+
You can add to that config file with these available options:
35
12
36
13
```ini
37
14
[settings]
@@ -84,6 +61,24 @@ some/submodule/name = new project name
84
61
^/home/user/projects/bar(\d+)/ = project{0}
85
62
```
86
63
64
+
### Project Config
65
+
66
+
Creating a `.wakatime` file in your project will overwrite your main `~/.wakatime.cfg` configs with the ones in your project config.
67
+
For example, if you want to ignore files in a `build` folder for `some-project`, but not in other projects then create a `.wakatime` file in `some-project` folder with these contents:
68
+
69
+
```ini
70
+
[settings]
71
+
exclude =
72
+
/build/
73
+
^COMMIT_EDITMSG$
74
+
^TAG_EDITMSG$
75
+
^/var/(?!www/).*
76
+
^/etc/
77
+
```
78
+
79
+
Now any time spent working on files in any `build` folder will be ignored in `some-project` but not in `other-project`.
80
+
Notice how you have to include the exclude patterns from your main `~/.wakatime.cfg` or they'll be overwritten.
81
+
87
82
### Settings Section
88
83
89
84
| option | description | type | default value |
@@ -160,7 +155,33 @@ some/submodule/name = new project name
160
155
161
156
For commonly used configuration options, see examples in the [FAQ](https://wakatime.com/faq).
See the [source code](https://github.com/wakatime/wakatime-cli/blob/36f6372880d7113382e99453c2b94ff727788ae2/pkg/project/project.go#L145) for specifics.
173
+
174
+
### WakaTime Project File
175
+
176
+
To overwrite the auto-detected project, create a `.wakatime-project` file in your project’s root folder.
177
+
The first line of the file contents overwrites the project name, if present.
178
+
The second line, if present, overwrites the current branch name when working inside this folder.
179
+
When the `.wakatime-project` file is empty, the folder’s name is used as the project name.
180
+
Whenever a `.wakatime-project` file is found, it overwrites all other project detection.
181
+
163
182
## Internal INI Config File
164
183
165
184
The plugins and wakatime-cli use a separate internal INI file for things like caching auto-update requests to the GitHub releases API, and exponential backoff to the WakaTime API.
166
185
The default internal INI config file location is `$WAKATIME_HOME/.wakatime/wakatime-internal.cfg`.
0 commit comments