3. [Create /srv/git/some_repository](#create-on-server-global-repository)
* Change permissions to git group for some_repository.
-4.
- * git clone /srv/git/some_repository with: ```git clone some_user@server:/srv/git/some_repository```
+ 4. git clone /srv/git/some_repository with:
+ ```git clone some_user@server:/srv/git/some_repository```
- 4. [Git add, commit, push from the server if it is an initial new repository.](#git-add--commit)
+ 5. [Git add, commit, push from the server if it is an initial new repository.](#git-add--commit)
---
- > This document is under editing.
-
+ > This document is currently being edited.
---
## Create On Server Global Repository
```bash
+ su -i root
mkdir /srv/git/PerlCNFWEBServer.git
chown -R git:git /srv/git/PerlCNFWEBServer.git/
cd /srv/git/PerlCNFWEBServer.git
touch git-daemon-export-ok
- cd /srv/git
- git init --bare --shared=group -b master PerlCNFWEBServer.git
+ git init --bare --shared=group -b master .
```
+ ```
+ git help init excerpt:
+ --bare
+ Create a bare repository. If GIT_DIR environment is not set, it is set to the current working directory.
+ --shared[=(false|true|umask|group|all|world|everybody|0xxx)]
+ Specify that the Git repository is to be shared amongst several users. This allows users belonging to the same group to push into that repository. When specified, the config
+ variable "core.sharedRepository" is set so that files and directories under $GIT_DIR are created with the requested permissions. When not specified, Git will use permissions
+ reported by umask(2).
+ -b <branch-name>, --initial-branch=<branch-name>
+ Use the specified name for the initial branch in the newly created repository. If not specified, fall back to the default name (currently master, but this is subject to change in
+ the future; the name can be customized via the init.defaultBranch configuration variable)
+ ```
+ - Clone somewhere as the user on the server the new repository as local to start adding files to it. Branch should default to master.
+ ``` git clone /srv/git/PerlCNFWEBServer.git ```
+
+<p style="text-align:right;">
+<a href="#git-installation-for-developers-steps">To Top of Page</a>
+</p>
-
-[Top](#git-installation-for-developers-steps)
## Git Add & Commit
+ - Check the ```git branch```
+ - Check git status ```git status ```
+ - Add new file with ```git add some_file.ext```
+ - Add directory with ```git add some_dir```
+ - Git commit to stage ```git commit -m'..some short description...'```
+ - Finally push to repository ```git push```
-[Top](#git-installation-for-developers-steps)
+<p style="text-align:right;">
+<a href="#git-installation-for-developers-steps">To Top of Page</a>
+</p>
---
- [Adding With Shell Access as Remote](#adding-with-shell-access-as-remote)
- [Create Public Key on Client](#create-public-key-on-client)
- [Create On Server Global Repository](#create-on-server-global-repository)
- - [Git Add & Commit](#git-add--commit)
+ - [Git Add \& Commit](#git-add--commit)
- [**Table Of Contents**](#table-of-contents)
<!-- /code_chunk_output -->
\ No newline at end of file