Thanks to visit codestin.com
Credit goes to github.com

Skip to content

SparkyOfficial/auto-git-commit-Sparky

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Auto Commit Tool

This is a simple Node.js application that automatically commits all changes in the current directory when you exit the program.

Features

  • 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

Requirements

  • Node.js (version 12 or higher)
  • Git

Installation

  1. Open this folder in VS Code
  2. Initialize a git repository:
    git init
    
  3. Configure git user:
    git config user.name "Auto Commit Tool"
    git config user.email "[email protected]"
    
  4. Install dependencies:
    npm install
    

Usage

  1. Run the program:

    npm start
    
  2. Make any changes to files in this directory while the program is running

  3. Type "exit" to quit the program and automatically commit all changes

How It Works

When you run the program:

  1. It checks if the current directory is a git repository
  2. If not, it initializes a new git repository
  3. While running, you can make any file changes you want
  4. When you type "exit", it:
    • Adds all changes to git
    • Creates a commit with a timestamp and list of changed files
    • Exits the program

Example

To run the program and automatically commit changes:

echo exit | npm start

Author

Андрій Будильников

About

This is a simple Node.js application that automatically commits all changes in the current directory when you exit the program.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors