Gitone¶
Combine multiple git version controls steps into one command.
Introduction¶
Unlike git shell commands, gitone automatically generates commit messages with every command.
The gitone Python package consists of 8 shell commands and
functions:
cam, which stands forgit commit -am, will add and commit all changes made to tracked files.camp, which stands forgit commit -am && git push, will add and commit all changes made to tracked files and push the commit to the remote repository.acm, which stands forgit add --all && git commit -m, will add and commit all changes made to all files and push the changes to the remote repository.acmp, which stands forgit add --all && git commit -m && git push, will add and commit all changes made to all files and push the changes to the remote repository.
and the --aamend version of the above function:
aamend, which is short forgit commit --aamend -am, will overwrite the previous commit by adding and committing all changes made to tracked files.aamendp, which is short forgit commit --aamend -am && git push --force, will overwrite the previous commit by adding and committing all changes made to tracked files and then force push the overwritten commit to the remote repository.aamend, which is short forgit add --all && git commit --aamend -m, will overwrite the previous commit by adding and committing all changes made to all files.aamendp, which is short forgit add --all && git commit --aamend -m && git push --force, will overwrite the previous commit by adding and committing all changes made to all files and then force push the overwritten commit to the remote repository.
Installation¶
$ pip install gitone
Usage¶
Just run one of available shell commands or Python functions without arguments and a commit message will be automatically generated.
>>> camp()
>>> acmp()
>>> cam()
>>> acm()
$ camp
$ acmp
$ cam
$ acm
You can also pass a commit message to any of the functions or shell commands.
>>> camp(message="Made some changes.")
>>> acmp("Lemme try something.")
>>> cam("Not sure what changed.")
>>> acm("Should be OK now.")
$ camp Made some changes.
$ acmp Lemme try something.
$ cam Not sure what changed.
$ acm Should be OK now.
To overwrite the previous commit, you can use the aamend functions.
If you do not provide a commit message, the previous commit message will be reused.
>>> aamend()
>>> aamendp()
>>> aamend()
>>> aamendp()
$ aamend
$ aamendp
$ aamend
$ aamendp