Open
Description
repo.create_head(branch_name)
would be more intuitive as repo.create_branch(branch_name)
or repo.branch.create(branch_name)
Merging a branch would be more intuitive as repo.merge(from=branch_name)
instead of
# prepare a merge
master = cloned_repo.heads.master # right-hand side is ahead of us, in the future
merge_base = cloned_repo.merge_base(new_branch, master) # allwos for a three-way merge
cloned_repo.index.merge_tree(master, base=merge_base) # write the merge result into index
cloned_repo.index.commit("Merged past and now into future ;)",
parent_commits=(new_branch.commit, master.commit))
It would be nice if you could do repo.head.sha
in addition to repo.head.commit.hexsha
Because of the above I switched to repo.git.gitCommand to access the git commands directly.
Thanks for making the gitpython library!