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.
Automatically detect file changes during a Workflow runIt's called git-auto-commit. Once changes are detected, those are committed and pushed back to the GitHub repo.
To do the same in Visual Studio, right-click the commit you want to revert and then select Revert.
Automatically commits files which have been changed during the workflow run and push changes back to remote repository.
Just enter your commit message and then select Commit All. The equivalent command for this action is git commit -a . Visual Studio also makes it easy to commit and sync with one click by using the Commit All and Push and Commit All and Sync shortcuts.
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')"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With