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. 
`pull_main_branch` returns to the original directory, `squash_merge_into_main_branch` does not. Can we make this consistent?