![]() Hopefully this small article can help you in save some time in setting up a sharable Git repository, as you can see this it’s quite easy. Mydirectory.git : The name of the directory where you want to clone the remote Git repository.Īfter the clone the next 2 commands just do a cd (change directory) in the cloned repository and make it a shared repository, so new files will have the correct permissions. Remoterepository : this is the remote repository you want to clone such as: –bare : This is equivalent of the –bare parameter in the init command, so Umask 002 : This set the umask of the current user so all the new files created will have a 664 permission and directory 775. Git clone -bare remoterepository mydirectory.gitĮxplanations of the commands and parameters: You can verify the status of an existing Git repository looking in its config file, you should see a line containing: 0640 will create a repository which is group-readable but not writable. 0xxx: 0xxx is an octal number and each file will have mode 0xxx.all (or world or everybody) – same as group, but make the repository readable by all users.Here the -f option force the content into the current directory, even if its not empty. group (or true) – makes the repository group-writable If you want to use the content without additional project folder, you can use degit.–shared = This option sets the permissions on everything in the repository to group-writable, possible values of this parameter are: When he ssh's into the git repository, there is plenty of directory structure there. ![]() 6 (although now that branch isn't showing on a -single-branch clone attempt). This isn't correct - my colleague pushed plenty of (nonempty) changes on Dec. git directory are placed in the top-level directory where the working directory would normally be, this is the suggested setup to setup a shared projectĬheck the following article to know why shared repositories should be bare repositories. A git log provides: fatal: your current branch 'master' does not have any commits yet. –bare = When you create a git repository with the –bare option these 2 things happen:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |