Git Version Control - Views on Repositories?
Asked Answered
E

3

6

I have a repositories, i want to have two "views": Developers can see the whole thing and customers should only see certain (tagged, or marked in another way) branches.

I thought about making two repsoitories A and B and than list all not needed files as "ignored files" in B but I am not sure whether this will work. (I don't know whether A syncs B's ignored files or not, may be some one who knows that can answer?)

Thus I thought it would be cool if i I could make "views" (show only tags X..) on the repository, or something similar which solves my problem, but afaik this is not possbile in git.

kind regards

Equinox answered 4/3, 2010 at 15:41 Comment(0)
V
2

Nevertheless my major problem remains:
if I clone repository A to B and I work on repository B than I see all branches of repository A (they are marked as remots/origin/[branchName]) - so if a customer starts GitWeb on Repository B he will see all Branches. And that's what I don't want.

You can manage access per repository with gitosis, and even access per tag or branch with gitolite.

Vesture answered 5/3, 2010 at 7:3 Comment(0)
A
7

Branches in git are local.

You can have any number of branches locally and push only the relevant ones to the relevant repositories.

alt text http://nvie.com/wp-content/uploads/2009/12/Screen-shot-2009-12-24-at-11.32.03.png

The image above from http://nvie.com/git-model is a good workflow, in which developers have many branches but push only the develop branch and similarly the production server has only the master branch.

Aestivate answered 4/3, 2010 at 15:49 Comment(1)
Your push advice helped me a lot!, that's exactly what i needed. - Nevertheless my major problem remains: if i clone repository A to B and I work on repository B than I see all branches of repository A (they are marked as remots/origin/[branchName]) - so if a customer starts GitWeb on Reporitory B he will see all Branches. And that's what i don't want.Equinox
V
2

Nevertheless my major problem remains:
if I clone repository A to B and I work on repository B than I see all branches of repository A (they are marked as remots/origin/[branchName]) - so if a customer starts GitWeb on Repository B he will see all Branches. And that's what I don't want.

You can manage access per repository with gitosis, and even access per tag or branch with gitolite.

Vesture answered 5/3, 2010 at 7:3 Comment(0)
P
1

You just need a clone repository. In this other repository you can push only your tag that you want and branches that you want in commit that you want.

Parous answered 4/3, 2010 at 15:53 Comment(1)
Workflow for my use-case "building partial clone of a repositoy (for e.g. customers)": 1. clone development repository 2. delete all branches in the clone which you don't want to show your customer 3. push only branches which sould be visible to the customer in your clone. Problem: 1. and 2. will take A LOT of time if you have many branches. I think i found the solution to my problem: git-wt-commit.rubyforge.org/#git-publish-branchEquinox

© 2022 - 2024 — McMap. All rights reserved.