]> lifelog.hopto.org Git - dev_notes.git/commitdiff
.
authorWill Budic <redacted>
Thu, 15 May 2025 11:41:51 +0000 (21:41 +1000)
committerWill Budic <redacted>
Thu, 15 May 2025 11:41:51 +0000 (21:41 +1000)
configuration_notes/git_installation_with_gitweb.md

index b6f74bf6260fed323ac321688a1a4b71b59b79dc..6428e41a12ffd6465dcfa984bf27563f7a8e1c81 100644 (file)
 
  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. 
 ---
 
 
@@ -56,21 +55,45 @@ useradd -r -s /usr/bin/rbash -g git --home /home/dev_share dev_user
 
 ## 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>
 
 
 ---
@@ -85,7 +108,7 @@ useradd -r -s /usr/bin/rbash -g git --home /home/dev_share dev_user
     - [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