pull all branches function