unixsnob
unixsnob

Reputation: 1705

Git Visual Studio 2015 Automatic commit upon successful build

I would like to automate my commits on Visual studio. However, I do not want to commit every time the files change. I want to only commit upon successful builds. So my code is always "buildable".

The main reason, I tend to forget to commit in between big changes and I always end up committing before and after adding features.

Upvotes: 7

Views: 1239

Answers (1)

Ariel Rosado Rivera
Ariel Rosado Rivera

Reputation: 46

I believe that setting the following under PostBuild event on the project might work:

git commit -am "Succesful build at $(date -u +'%Y.%m.%d %H:%M:%S')"

Upvotes: 3

Related Questions