DEV Community

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

Collapse
craigewert profile image
CREEE

I am mystified. What was wrong with

git push

?

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.

Collapse
sauravjaiswalsj profile image
Saurav Jaiswal Author • Edited on

I did this because I have been doing 100 days of code for quite a long time and repeatedly pushing file with same command was quite irritating for me. So I thought to abstract the whole process into a single bash command. Hence I did all this. I found it the process useful so I thought to share with the community.

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