find /var/git/repositories/$repo.git/ -type f -exec sudo chmod 664 {} \;
find /var/git/repositories/$repo.git/ -type d -exec sudo chmod 775 {} \;
Now make sure that the repository configuration has the following option at the `core` section:
sharedRepository = group
You can edit `/var/git/repositories/$repo.git/config` to add this config or just run
the following commands:
git -C /var/git/repositories/$repo.git config core.sharedRepository group
### Daily workflow
From now on, you can work at your computer's local `$repo` as usual:
cd $repo
git pull
touch another-test
git add .
git commit -m "Adds another-test"
git push # this sends changes back to your git server
### Adding more users into the game
You can add existing users to edit the repository given that:
* They have accounts in the system.
* They are added into the `git` group.
If they also use key-based auth they can seamlessly contribute to your repository
as if you were using a more complex repository manager like gitolite or a service
like gitlab.
You can even try to implement some more complex access control by using different
groups for each project so you're not bound to the `git` group.
### References
- [How to make bare git repository group-writable after pushing?](http://stackoverflow.com/questions/15881104/how-to-make-bare-git-repository-group-writable-after-pushing).
- [Create Git bare / shared remote repository](http://pietervogelaar.nl/create-git-bare-shared-remote-repository/).
- [How to clone and share a Git repository over SSH](http://linuxaria.com/pills/how-to-clone-and-share-a-git-repository-over-ssh?lang=en)
Further development
-------------------
* [gitly self-hosted](https://gitly.io).
* [gitly self-hosted](https://gitly.io).
* [Git Large File Storage - Git Large File Storage (LFS) replaces large files such as audio samples, videos, datasets, and graphics with text pointers inside Git, while storing the file contents on a remote server like GitHub.com or GitHub Enterprise.](https://git-lfs.github.com/) / [#792075 - ITP: git-lfs -- Git Large File Support. An open source Git extension for versioning large files - Debian Bug report logs](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=792075).
* [Git Large File Storage - Git Large File Storage (LFS) replaces large files such as audio samples, videos, datasets, and graphics with text pointers inside Git, while storing the file contents on a remote server like GitHub.com or GitHub Enterprise.](https://git-lfs.github.com/) / [#792075 - ITP: git-lfs -- Git Large File Support. An open source Git extension for versioning large files - Debian Bug report logs](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=792075).