Hello. I have a silly question, but how ffs just merge two branches like 'git merge branch --no-ff'
i've tried something like this from tests:
# # prepare a merge
master = repo.heads.master # right-hand side is ahead of us, in the future
# # FROM MERGE!
merge_base = repo.merge_base(repo.branches['branch'], master) # allwos for a three-way merge
repo.index.merge_tree(repo.branches['branch'], base=merge_base)
repo.index.commit("AutoMerge Commit", parent_commits=(repo.branches['branch'].commit, master.commit))
but after this i got very strange log history. i have commits from 'branch', but changes only from master. Please help me
GitPython provides many capabilities, but does so on a lower level. Therefore sometimes it is best to simply use the git program to do the high-level work: repo.git.merge('branch-to-merge').
Most helpful comment
GitPython provides many capabilities, but does so on a lower level. Therefore sometimes it is best to simply use the git program to do the high-level work:
repo.git.merge('branch-to-merge').