Fix git related issues

1. Replace the command using 'foreach' with 'for' loop.
   'foreach' will stop the loop when error occured in one of the loop,
   In our usecase, we want continue the loop.
2. Add app name before output message from git command.
Merge pull request #45 from kurli/git_error_fix

Fix git related issues