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
Hi, I have git-based Godot projects I want to track time for, but some of them are client projects that wouldn't appreciate this addon being put into their remote repository, when it's for my personal use.
It took quite a while to get this working, but I have created a general git-clean filter that works for project.godot in Godot 3.x, to filter out this plugin addition, regardless of the order of plugins, and regardless of whether the [editor_plugins] section even exists. It will show no changes to project.godot after adding this plugin, upon staging the file (which is when the git clean filter kicks in). I won't provide instructions on how to configure a git clean filter, as those instructions exist elsewhere.
The working script is located in my dotfiles repository, let me know if you would like to either include it in the repository as a default example, or maybe add documentation on how to accomplish this. It's not trivial, and I imagine I'm not the only one who would find this incredibly useful. I know this isn't really an "issue" per se, but I didn't know where else to suggest this.
There's additional files for configuring a global clean filter, so that no project-level .gitattributes or .git/config or .gitignore has to be added or modified. It can all be done at a global level, once for all local git projects. You can see the other files for this in the commit here:
P.S. It uses GNU sed & GNU grep, which works on macOS & Linux, & I know there's some port for WIndows but that's untested, but in any case, I'm sure the script can easily be adapted for that environment as well.
The text was updated successfully, but these errors were encountered:
Hi, I have git-based Godot projects I want to track time for, but some of them are client projects that wouldn't appreciate this addon being put into their remote repository, when it's for my personal use.
It took quite a while to get this working, but I have created a general git-clean filter that works for
project.godot
in Godot 3.x, to filter out this plugin addition, regardless of the order of plugins, and regardless of whether the[editor_plugins]
section even exists. It will show no changes toproject.godot
after adding this plugin, upon staging the file (which is when the git clean filter kicks in). I won't provide instructions on how to configure a git clean filter, as those instructions exist elsewhere.The working script is located in my dotfiles repository, let me know if you would like to either include it in the repository as a default example, or maybe add documentation on how to accomplish this. It's not trivial, and I imagine I'm not the only one who would find this incredibly useful. I know this isn't really an "issue" per se, but I didn't know where else to suggest this.
https://github.com/knightofiam/dotfiles/blob/master/git/git-filters/clean/git-filter-project-godot-wakatime-addon.sh
Here's an example from the commit notes of just how flexible it is:
Completely filter the following git diff from
project.godot
:Completely filter the following diff from
project.godot
:Partially filter the following diff in
project.godot
from:to:
Partially filter the following diff in
project.godot
from:to:
There's additional files for configuring a global clean filter, so that no project-level
.gitattributes
or.git/config
or.gitignore
has to be added or modified. It can all be done at a global level, once for all local git projects. You can see the other files for this in the commit here:knightofiam/dotfiles@f5a1659
P.S. It uses
GNU sed
&GNU grep
, which works on macOS & Linux, & I know there's some port for WIndows but that's untested, but in any case, I'm sure the script can easily be adapted for that environment as well.The text was updated successfully, but these errors were encountered: