-3

When we want to add, commit all file at once and push on single command from git bash what is the syntax/command for it so that I don't have to type multiple command?

anil shrestha
  • 2,136
  • 2
  • 12
  • 26

1 Answers1

0

Command to add, commit all file and push to git at once:

New approach:

git commit -am "message" && git push origin branch_name

Traditional:

Step-1:    
git add. //for multiple file
or
git add file_name //for single file

Step-2:

git commit -m"hello message"

Step-3:

git push origin branch_name

Note: You can note that you don't have to write extra two command for add, commit and push if you want to do at once.

anil shrestha
  • 2,136
  • 2
  • 12
  • 26