How to use git namespace to hide branches

前端 未结 3 1127
夕颜
夕颜 2021-01-03 06:23

Background

I\'m working with a large team using git for version control. The normal flow is:

  • People selecting a ticket from the \"backlog queue\".
3条回答
  •  耶瑟儿~
    2021-01-03 07:15

    It seems as if the simplest solution here, since you're using GitHub and a pull-request workflow, is that developers should be pushing to their own fork of the repository rather than to a shared repository. This way their remote feature branches aren't visible to anybody else, so any "clutter" they see will be entirely their own responsibility.


    If everything lives in a single repository, another option would be to set up a simple web service that receives notifications from github when you close a pull request (responding to the PullRequest event). You could then have the service delete the source branch corresponding to the pull request.

    This is substantially less simple than the previous solution, because it involves (a) writing code and (b) running a persistent service that is (c) accessible to github webooks and that (d) has appropriate permissions on the remote repository.

提交回复
热议问题