This Ruby script automates the process of committing and pushing changes to a remote Git repository.
- It checks if there are any uncommitted changes in the local repository.
- If there are uncommitted changes, it performs a commit with an automated message.
- It generates an automated commit message based on the changes being made.
- It adds all modified or added files to the commit.
- It pushes the changes to the remote repository using the current branch name.
- It configures the Git command to use a personal access token for authentication.
- It displays the result of the push operation, including the automated commit message.
- Make sure you have Ruby installed on your system.
- Replace
YOUR_PERSONAL_ACCESS_TOKENwith your personal access token from GitHub. - Replace
your-email@example.comwith your email address. - Replace
YOUR_URL_PROJECTwith the URL of your GitHub project repository. - Run the script using the command:
ruby script_name.rb
Note: Before running the script, ensure that you are in the correct directory with the Git repository initialized.
This project is licensed under the MIT License.