howto:git
                This is an old revision of the document!
Table of Contents
Git
Test Scenario
- Create two files in aremotefolder to simulate the wiki install on the server.
- Change their permissions and ownership to match what's on the server:~/gittest/remote$ ls -l total 24 -rwxrwx--- 1 ptruchon www-data 26 Dec 26 10:20 file1.txt -rwxrwx--- 1 ptruchon www-data 26 Dec 26 10:20 file2.txt 
- Initialize git:git init git add . git commit -m 'initial commit on remote' git log commit 0e5ccdedd1c9188996aadad3a8e2be5a319ab789 (HEAD -> master) Author: Patrick Truchon <patoo@rbox.me> Date: Sun Dec 26 10:21:24 2021 -0800 initial commit on remote 
- Create a local folder and clone from remote:git clone ~/gittest/remote/ ~/gittest/local/ 
- The log on the local copy looks good:~/gittest/local$ git log commit 0e5ccdedd1c9188996aadad3a8e2be5a319ab789 (HEAD -> master, origin/master, origin/HEAD) Author: Patrick Truchon <patoo@rbox.me> Date: Sun Dec 26 10:21:24 2021 -0800 initial commit on remote 
- But thewww-datagroup ownership wasn't preserved:~/gittest/local$ ls -l total 24 -rwxrwxr-x 1 ptruchon ptruchon 26 Dec 26 10:24 file1.txt -rwxrwxr-x 1 ptruchon ptruchon 26 Dec 26 10:24 file2.txt 
- Change the group back towww-data:sudo chgrp www-data * ls -l total 24 -rwxrwxr-x 1 ptruchon www-data 26 Dec 26 10:24 file1.txt -rwxrwxr-x 1 ptruchon www-data 26 Dec 26 10:24 file2.txt 
howto/git.1640544022.txt.gz · Last modified:  by va7fi
                
                
