Giter VIP home page Giter VIP logo

autosaved's Introduction

Git Auto Commit Daemon

This lightweight shell script is designed to recursively check a target directory for Git repositories, stage all changes, and commit them to the _asd_ branch (creating the branch if it doesn't already exist) with a message indicating the number of modified files. The script will run as a background daemon, checking for changes every 15 minutes.

Requirements

Common Linux/UNIX binaries must be installed and available in the $PATH, to search you can use:

$ which git find printf
/usr/bin/git
/usr/bin/find
/usr/bin/printf

Note printf can be replaced with echo in shell script if desired.

Usage

Clone git repository and make the script executable using chmod +x autosaved.sh. Optionally, copy it to /usr/sbin/autosaved to access as a deamon. Instructions for usage can be printed using -h help text argument.

[autosaved]::git autocommit daemon
Automatically stage and commits change to '_asd_' branch every 15 minutes
Usage: autosaved --target DIRECTORY [--branch BRANCH] [--delay DELAY]
  --target  ASD_TARGET  Required. Spcify directory to watch for git repo(s), recursively.
  --branch  ASD_BRANCH  Optional. Default value '_asd_'. Specify git branch to commit changes.
  --delay   ASD_DELAY   Optional. Default value '900'. Specify thread sleep delay.

Output

The script will display status information, including these events to stdout:

When the script starts checking for changes
When changes are committed
When the script is sleeping

Note

Please make sure to test this script in a safe and controlled environment before using it on important data. The script is provided as-is and the author is not responsible for any potential data loss or corruption.

License

Project made available under GPLv3 License, refer to LICENSE.

autosaved's People

Contributors

sar avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.