Improve git branch function