Move pushd to reset_git_state()