Enforcing permissions on repository hierarchy: Is it possible

I've imported an existing repository from SVN. The repository currently has a heirchacal stucture by product. Each product has a few different teams associated with it, as well as a number of sub projects

The structure looks like this

/product

--/firmware

--/enclosure

--/packaging

--/pcb

--/software

----/windows

----/android

----/ios

With SVN, I can just assign groups and individual users to paths that they should be accessing. A common scenario is that a user has access to one or two paths but not all. For instance, a user may have access to firmware and windows or enclosure and pcb.

It looks like the BitBucket way to do it would be to create a team for product and then a separate repository for each discint project. For instance:

  • Product-Firmware
  • Product-Enclosure
  • Pproduct-Packaging
  • Product-PCB
  • Product-Windows
  • Product-Android
  • Product-Ios

I guess this is doable, but the current structure makes a lot more sense to me since.

1 answer

1 accepted

Git is foundationally different from SVN. If you approach it thinking "It's basically like SVN, with a few differences", you'll constantly be frusterated that things don't work the way you expect. I know this from experience. They aren't different the way Java and C# are different. They're different the way Java and Python are different.

In relevance to your question in particular, Git doesn't explicitly store any information about folders, so folder-level permissions doesn't make sense. The common illustration of this is that if you add a new folder to a Git working copy (and make no other changes), the git commands will all still behave as though your working copy is in sync with the repository. If you delete all files from a folder and commit, then a clone of the repo won't include that folder at all.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

22,744 views 26 12
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you