I\’m a big fun of automation. I would even say \’what can be automated, can be forgotten\’ and you can focus in important things. This post happen to be next in new series called \”Automation\”. The series came out somehow, I didn\’t plan it. It just seem that there are things I would like to share 🙂
First post of the series is here Automate everything!
During the day I make changes in multiple git repositories. Sometimes 2, sometimes 5 or 10. Switch focus for 2 mins and back. Add some code and back. Amend some more code 20 minutes later or so. Basically it\’s worth-less to push (maybe unfinished changes) over and over to remote server.
I can add extra layer like branch. yes, everything is clean, branches are cheap. Great… but this is another thing I have to think about! I don\’t want to use take on thinking \”am I on the correct branch?\”. I want to automate as much as possible.
So I came up with a simple script that checks particular folder got changes.
Script is written in Powershell.
Current version is always available here: gitDirectoryStatus.ps1
Script can be executed like following
With results in:
I have ha fast feedback on what should (or should not) be be pushed to remote server…
Such tiny script saves me a lot of time. I don\’t need to remember to push changes after I\’m done programming. Usually at the end of the day I execute the script and it gives me status of all projects. No remembering, just pure automation.