Freezing a Git branch -
let's have develop branch. create feature branch develop feature. once feature developed, merged develop. pretty shown here:
is there way can freeze feature branch no further commits can made it?
the reason not outright deleting branch viewing history can still show feature branch , if there needs tweak made feature possible create new feature branch last commit of previous feature.
christopher right, tagging this. recommend deleting branch name make little harder checkout branch , make edits.
first, merge branch develop
git checkout develop git merge --no-ff feature_1
then checkout branch
git checkout feature_1
then create tag, comment.
git tag -a -m "freezing feature branch fixes.." feature_1_frozen
then delete branch
git checkout develop git branch -d feature_1
after doing this, won't able checkout branch name. instead you'll able checkout tag name, put detached head state deter changes code.
now wrap things , sync origin...
push update , new tag
git push --tags origin develop
delete remote feature branch
git push origin :feature_1
Comments
Post a Comment