Git: Push to a remote repository with a message

PruitIgoe picture PruitIgoe · May 9, 2012 · Viewed 54.7k times · Source

My company is incorporating iRise for prototyping and it lacks any kind of versioning (unless making copies of your files with different file names = versioning). Anyway, we're using Git for our version control and since the typical iRise user here will be a graphic/web designer I want to automate the process as much as possible. I have a hot folder running an AppleScript that will push to a remote repository but I'm not sure how to add a message...

git push TestProject master 

tried

git push TestProject master -m 'message'

but threw a switch error and showed a list of options, -m not being one of them...

is this possible or do you have to commit locally first and then push that to the remote and the message will be attached with it?

Answer

manojlds picture manojlds · May 9, 2012

You will have to do a commit ( after adding files)

git commit -m 'message'

and then push:

git push TestProject master

You cannot associate a message to the push.