To automate the process of committing and pushing to GitHub after a change or addition of a file, you can use a shell script or a batch file that executes the necessary Git commands.
1- Modify the file git-acp.sh with your info, if you want.
2- Ensure that the script is executable using the following command: chmod +x git-acp.sh
3- ./git-acp.sh to execute the file
git clone https://oauth2:TOKEN@github.com/username/repo.git
It is better to enter the token at the beginning when cloning Repo to avoid the request or the error of the push after.