git-filter-repo/t/t9391/rename-master-to-develop.py

13 lines
313 B
Python
Raw Normal View History

#!/usr/bin/env python
import git_filter_repo as fr
def my_commit_callback(commit):
if commit.branch == "refs/heads/master":
commit.branch = "refs/heads/develop"
args = fr.FilteringOptions.default_options()
args.force = True
filter = fr.RepoFilter(args, commit_callback = my_commit_callback)
filter.run()