Git sync fork

@kevgo please review
I would make helper methods here: remember_original_branch and return_to_original_branch