Is there any way to use these three commands in one?
git add .
git commit -a -m \"commit\" (do not need commit message either)
git push
Som
I think you might misunderstand the workflow that git was designed for. (To clarify/correct what I meant in the comment, you don't need the git add .
, since commit -a
usually serves the same purpose - adding any changes that have not yet been staged, if the files have already been added)
Typically you'll do something like this:
# make some changes
$ git commit -a -m "Changed something"
# make some more changes
$ git commit -a -m "Changed something else"
wash, rinse, repeat, until you've finished feature X, or you're at a stopping point, or you just want other people to see what you've done. Then you do
$ git push
Git is not SVN - but it appears that you're trying to use it as such. You might find some of the resources at the end of the article here to be of some use.