On Sun, 11 Mar 2012 06:19:26 -0700 (PDT)
Mark Liversedge <liverse...@gmail.com> wrote:
> I have a branch on github that was used for development for the last
> 18 months, but it has now been merged back into master.
> I will be removing it shortly, but am keeping it just in case
> anything odd crops up, or folks have local versions they are working
> against and submit a patch in the next couple of weeks.
> But .. I don't want to use the branch, any pushes to github must go
> against master, since this branch will be deleted soon.
> is there a way of 'freezing' or 'hiding' a remote branch so no
> updates can be pushed (and ideally, it cannot be cloned either) ?
Just replace the branch with a tag (possibly annotated).
The "trick" is that tags point to lines of history, just like branches,
but they don't move. There's no problem with using tags to refer to
history--be it `git diff`, `gitk` etc.
Assuming that branch to be freezed is called "feaure", do something
$ git checkout master
$ git tag -a feature feature
...Write up a tag message explaining the freeze...
$ git branch -D feature
$ git push github :feature feature
The last command will first delete the branch "feature"
in the remote repository and then push the same named tag
there effectively replacing the branch with the tag.
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To post to this group, send email to email@example.com.
To unsubscribe from this group, send email to
For more options, visit this group at