B
B
Bogdan2017-06-04 18:14:34
git
Bogdan, 2017-06-04 18:14:34

How to combine add && commit && push into one alias in git?

Hello. How to properly combine 3 commands into one alias,

git add .
git comit -am 'Message'
git push

but so that it would be possible to set the message for commit? Thanks

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
aol-nnov, 2017-06-05
@bogdan_uman

Your task is not just to slap commits into the git ?! It is necessary to approach the matter consciously: to see if everything has been added / not added too much, by the diff before the commit, see if there is an outright trash and then write a meaningful commit message.
And you're thinking about the "do it right" button. So you can't do without a libastral.

T
TyzhSysAdmin, 2017-06-04
@POS_troi

Write a BASH script.

message=$1
git add .
git comit -am $1
git push

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question