Good afternoon, the question is:

I started using distributed git with my colleague, while in the most artisanal way: we created a shared folder on my workstation, there is a git repository, and use it as a server via http.

1) When I create a new branch on the “server” (after we have already cloned the rep from the server), information about this does not appear in the client copies.

Those. cloned the repository with the master branch, then I created the last and stable, additional branches on the "server", and I want clients to push / pull to last, pull from stable and not be able to see additional.

But in the end, the client (as expected) is not notified of new branches, but knowing their names can have full access to all branches.

Those. the question is whether it is possible to customize the rights, visibility, and notifications of the client about new branches with a regular git?

2) If the answer to question 1 is negative, then is there any distribution kit that will allow you to have all that is described above?

Thank you in advance!



    1 answer 1

    I started using distributed git with my colleague, while in the most artisanal way: we created a shared folder on my workstation, there is a git repository, and use it as a server via http.

    and why share the directory? no need

    When I create a new branch on the “server” (after we have already cloned the rep from the server), information about this does not appear in the client copies.

    If someone needs a branch from the server - just clone itself.

    and I want clients to push / pull to last, pull from stable and can't see additional.

    do not want others to see your thread - do not publish it. This is the right way.

    customer alerts about new branches?

    It's possible. There are hooks in git. (a little bit in Russian). For example, you can send by mail. If you strongly need, then you can even send by jabber / icq. You can send the client a set of commands that he needs to execute in order to get a branch for himself.

    Those. the question is whether it is possible to set up the rights, visibility, by a regular git

    I do not know the visibility, but on the record - it is possible. There is such a hook - update - it gets three parameters, two of which are the branch and the user name. Depending on what the script returns, you can clip push to the branch. Making it a system of restricting rights is easy.

    That is, we study hooks, we make our system of delimitation on their base.