Answers for "git add, commit and push in one command"

2

git add commit push one command

# The following command does not add new files, only updated pre-existing ones.
git commit -am "commit all the things" && git push
Posted by: Guest on October-22-2020
1

git commit and add in one command

// first define a new alias for the commands:
git config --global alias.add-commit '!git add -A && git commit'

// and then use it by typing in the message:
git add-commit -m 'My commit message'

//Credit for the original post on stackoverflow.
Posted by: Guest on February-18-2021
0

git add, commit and push in one command

git config --global alias.cmp '!f() { git add -A && git commit -m "$@" && git push; }; f'
Posted by: Guest on October-17-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language