Feeling lazy? Quickly run a script in place of manually adding/committing/pushing
I find that I'm often running the same set of Git commands when I'm updating a(n unimportant) project and have nothing specific to put in the commit messages for the changes I made:
git add .
git commit -m "Update ProjectName"
git push
This prompted me to want to spin up some really simple Git scripts for a few different scenarios I often find myself in
Keep in mind that you may need to run the following to allow your current PowerShell session to run PowerShell scripts not digitally signed:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
Run one of the following scripts from within the root of the repo you are updating (it does not matter if the script itself is located in a different directory):
- Run either of the following to add all files, set a simple commit message pertaining to the repo name, and push:
.\Add-All.ps1
python add_all.py
- Run either of the following to add all files, set a simple commit message per file pertaining to that file's name, and push:
.\Add-Per-File.ps1
python add_per_file.py