GIT Commit using PowerShell

Posted by

There are situations that you need to integrate the git commit in your workflow pipeline. In my situation I needed to update the Dynamic AWX Inventory, which is based on a YAML file placed on our company git. The function is quite simple, it add new files commit them and push it to the git repo.

Make sure that the git repo is cloned to the Windows Filesystem and your PowerShell working directory is in that git folder.

You can extend this function with a initial clone and changing directory before commit. Running this function without a commit message will add a timestamp.

Leave a Reply

Your email address will not be published. Required fields are marked *