DEV Community

Cover image for From Add to Push in a Single Line in Git
Daniel Nogueira
Daniel Nogueira

Posted on • Edited on

From Add to Push in a Single Line in Git

I adopted the multiple commands on a single line to push to GitHub. Instead of running:

git add .
git commit -m 'Update file'
git push
Enter fullscreen mode Exit fullscreen mode

I simply run:

git add .; git commit -m 'Update file'; git push
Enter fullscreen mode Exit fullscreen mode

Believe me, the use of semicolons to execute multiple commands can make a difference when we want agility in the moments of development.

But of course, each case is different. There will be times when a specific commit will be needed.

Top comments (0)