git branch - Git: see many branches in a single view -
is there way see changes many branches in git in single view. example if project consists of scripts part , c code part, can have them on 2 separate branches still see changes in single view?
to create such "view", create third branch , merge branches care about:
git checkout -b view branch1 git merge branch2 # 'view' sees contents of both branches
view
show branch contents @ time of creation. update view, add new merged content:
git checkout view # switch view git merge branch1 branch2 # ...and merge new branch contents
if file names in branches disjoint, merges should never have conflicts. if there conflicts on common files (such readme
), trivially resolved, , resolution confined (and remembered by) view
branch.
the same logic applies more 2 branches, merge
command accepts arbitrary number of branches merge.
Comments
Post a Comment