Skip to content

Automated Git Committer: A Node.js script for automating random commits using simple-git and moment.js

License

Notifications You must be signed in to change notification settings

reblox01/automated-git-committer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Automated Git Committer

Thumbnail

Overview

This repository contains a Node.js script that automates the process of making random commits to a specified file in a Git repository. The script uses simple-git for Git operations and moment for date manipulation.

Features

  • Randomly generates commit dates within the past year.
  • Writes the generated date to a specified file.
  • Commits the changes with the generated date.
  • Repeats the process for a user-specified number of commits.
  • Prompts for the number of commits to make at runtime.
  • Asks if the user wants to start another task after completion, allowing for a new run without restarting the script manually.
  • Handles invalid input by asking the user to enter a valid number of commits.
  • Uses clear and informative progress bars and messages during the commit process.

Installation

  1. Clone the repository:
    git clone https://github.com/reblox01/automated-git-committer.git
    cd automated-git-committer
  2. Install the dependencies:
    npm install
  3. If not already initialized, initialize a local Git repository and link it to your remote repository:
    # Delete old .git if already exist and create another one
    git init
    
    # Link your repository with your local prj
    git remote add origin https://github.com/your-username/automated-git-committer.git

Usage

  1. Open the index.js file and adjust the FILE_PATH constant if necessary.

  2. Run the script with Node.js:

    node index.js

    Or

    npm start

Configuration

  • The number of commits to make can be adjusted by changing the argument passed to the makeCommit function at the bottom of the index.js file. For example, makeCommit(10) will make 10 commits.

Dependencies

  • simple-git - A simple interface for running Git commands in any Node.js application.
  • moment - A library for parsing, validating, manipulating, and formatting dates.
  • fs - File system module for reading and writing files.

Support

If you find this project helpful and would like to support its development, you can buy me a coffee:

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.

Contact

For any inquiries or support, please contact [email protected].

Acknowledgements

Thank you to everyone who has supported and contributed to this project. Your feedback and assistance are invaluable.

About

Automated Git Committer: A Node.js script for automating random commits using simple-git and moment.js

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published