-
-
Notifications
You must be signed in to change notification settings - Fork 13.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add gitwatch module #337273
Add gitwatch module #337273
Conversation
Change-Id: I2c39ccd6a13aa74ac1ae1bbf7c60163598019f62
6627e2f
to
6e06c32
Compare
Useful script to automatically commit and push changes in watched folders. What to use it for? * My case: **cad programs** which does not have their own version control or cloud. e.g. Kompas3D. Next, copy-paste from README of project: * **config files**: some programs auto-write their config files, without waiting for you to click an 'Apply' button; or even if there is such a button, most programs offer you no way of going back to an earlier version of your settings. If you commit your config file(s) to a git repo, you can track changes and go back to older versions. This script makes it convenient, to have all changes recorded automatically. * **document files**: if you use an editor that does not have built-in git support (or maybe if you don't like the git support it has), you can use gitwatch to automatically commit your files when you save them, or combine it with the editor's auto-save feature to fully automatically and regularly track your changes Change-Id: I509dea55def25ccfbb36bf8a2bae685b51a757fb
Create module for gitwatch script. This module runs systemd services. You are able to have several services for different paths at once. Change-Id: If6100e883dd12a428f79881a80b9b88e683f6db9
|
||
wrapProgram $dest \ | ||
--prefix PATH ';' ${ | ||
lib.makeBinPath [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a minor nitpick, can the PATH be injected directly into the script rather than wrapping in an outer script?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please give me the link on how to do so?
Create gitwatch script and module
Gitwatch is useful script to automatically commit and push changes in watched folders.
What to use it for?
control or cloud. e.g. Kompas3D.
Next, copy-paste from README of project:
config files: some programs auto-write their config files, without
waiting for you to click an 'Apply' button; or even if there is such
a button, most programs offer you no way of going back to an earlier
version of your settings. If you commit your config file(s) to a git repo,
you can track changes and go back to older versions. This script makes it
convenient, to have all changes recorded automatically.
document files: if you use an editor that does not have built-in git
support (or maybe if you don't like the git support it has), you can use
gitwatch to automatically commit your files when you save them, or combine
it with the editor's auto-save feature to fully automatically and regularly
track your changes
Additionally, create module for gitwatch script. This module runs systemd services.
You are able to have several services for different paths at once.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.