git - Check out latest master branch after current branch is merged into it by another user -
let's have single master branch , push new code feature-a branch, sub-branch master:
- feature-a
- master
now have feature-a branch checked out.
later different person merges feature-a master , closes feature-a branch:
- master (merged feature-a)
- feature-a
- master
but sourcetree stuck old feature-a branch , have resort using reset --hard move latest master commit , rid of feature-a references.
is there way make process more streamlined? ideally script/simple button sequence automatically move latest master commit,
the key thing remember here feature-a
has been merged master
, feature-a
has not been updated. therefore feature-a
still - middle commit in second diagram.
if reset --hard
, you're forcing feature-a
branch point master
, isn't has happened in remote repository.
instead want checkout master
, continue working; or perhaps create new feature branch starting @ master
.
Comments
Post a Comment