Prevent git command injection attacks

Fixed a security vulnerability where special characters in git branch names could be interpreted as shell commands. The code now ensures git commands are executed directly without shell expansion, and added a test to verify branch names with special characters like '&' are handled safely.