DEV Community

Discussion on: Automating git push with just a single bash command

Collapse
guzzur profile image
Felix Razykov

This one does add all -> commit with message -> push

Collapse
craigewert profile image
CREEE

git commit -a -m "message here" & git push

And if you do it once, its always in your history

Thread Thread
evankapantais profile image
Evan Kapantais

That's a better approach.

Thread Thread
craigewert profile image
CREEE

Actually I dont do that myself. I always leave off the -m and let it pop up vim for me to enter a commit message. Usually I want to review what files are getting committed, and often my commit message is a short story.

Thread Thread
evankapantais profile image
Evan Kapantais

Yeah, I see your point. The way I see it, even setting up aliases makes is much easier than having to condense everything in a single line.

Some comments have been hidden by the post's author - find out more