简体   繁体   中英

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.

我相信在项目的PostBuild事件下设置以下内容可能有效:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM