Refactor git helpers

Now the git helpers do not make use of `$initial_branch_name`.
The functions no longer rely on global state (aside from `initial_open_changes`), but I have an idea of how to remove that as well. 

This came about through my need to be able to push and pull a non feature branch. 
We should only push the main branch if it actually has changes. I'd like to keep the run time as short as possible.