I\'m writing a bash script to add, commit, push all files in a directory.
#!/bin/bash
git add .
read -p \"Commit description: \" desc
git commit -m $de
it is helpful to remove from the index the files that have actually been deleted. git add -u takes care of this. Also, you may want to consider chaining these commands together like this:
git add . && \
git add -u && \
git commit -m "$(read -p 'Commit description: ')" && \
git push origin HEAD
If any command fails, it will stop evaluating the remaining commands.
Just food for thought (untested food).
Thanks!