This is a simple Node.js application that automatically commits all changes in the current directory when you exit the program.
- Automatically initializes a git repository if one doesn't exist
- Tracks all file changes in the current directory
- Commits all changes with a timestamp when exiting
- Shows a list of changed files in the commit message
- Node.js (version 12 or higher)
- Git
- Open this folder in VS Code
- Initialize a git repository:
git init - Configure git user:
git config user.name "Auto Commit Tool" git config user.email "[email protected]" - Install dependencies:
npm install
-
Run the program:
npm start -
Make any changes to files in this directory while the program is running
-
Type "exit" to quit the program and automatically commit all changes
When you run the program:
- It checks if the current directory is a git repository
- If not, it initializes a new git repository
- While running, you can make any file changes you want
- When you type "exit", it:
- Adds all changes to git
- Creates a commit with a timestamp and list of changed files
- Exits the program
To run the program and automatically commit changes:
echo exit | npm start
Андрій Будильников