This shell will automatically execute commands git add .
, git commit -m "date of today"
and git push
if you input "y" in Terminal
. The date of today
will be acquired in shell automatically.
You are supposed to finish your first git push -u origin master
(maybe your branch is called main)before you use this shell. Or, you can edit the shell in the 8th line from git push
to git push -u origin master
(maybe your branch is called main).
- Move this shell to your workspace directory i.e. in the same directory with
.git
- Use chmod to add executable permissions
chmod +777 git_tools.sh
- Run the shell
./git_tools.sh
- After you run the shell, the Terminal will print
git status
. If there is nothing out of your expectations, inputy
to continuegit commit
andgit push
. Otherwise, you can inputN
to cancel the commit.
-
2024.12.29
Added a batch script for Windows, you can double click the
git_tools.bat
in Windows for autogit add/commit/push