Last active
June 26, 2018 03:58
-
-
Save SuperSarkar/b54ca5c7a8b49450cf07d04e9680f225 to your computer and use it in GitHub Desktop.
Revisions
-
SuperSarkar revised this gist
Jun 26, 2018 . 1 changed file with 31 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,40 @@ 1. Create a Bare Repo on Server ``` ssh kunal@domain.com mkdir website.git cd website.git git init --bare ``` 2. Create a Hook to copy files from the bare git directory to the nginx/apache website directory ``` cd hooks mv post-update.sample post-update nano post-update ``` Update the "post-update" hook with following content: ``` git --work-tree=/var/www/html/domain.com/public_html --git-dir=/home/kunal/website.git checkout -g ``` 3. Initialize the local repo: ``` cd proj git init git add . git commit -m "First commit" ``` 4. Push to Server ``` git remote add origin kunal@ipaddress:/home/kunal/website.git git push origin master ``` If you are using SSH keys to login to the server, make sure "pageant" is running with the keys added to it. -
SuperSarkar revised this gist
Jun 26, 2018 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,8 @@ ```ssh kunal@domain.com mkdir website.git cd website.git git init --bare ``` 2. Create a Hook to copy files from the bare git directory to the nginx/apache website directory -
SuperSarkar revised this gist
Jun 26, 2018 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,9 @@ 1. Create a Bare Repo on Server ```ssh kunal@domain.com mkdir website.git cd website.git git init --bare``` 2. Create a Hook to copy files from the bare git directory to the nginx/apache website directory -
SuperSarkar revised this gist
Jun 26, 2018 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,9 @@ 1. Create a Bare Repo on Server `ssh kunal@domain.com mkdir website.git cd website.git git init --bare` 2. Create a Hook to copy files from the bare git directory to the nginx/apache website directory -
SuperSarkar created this gist
Jun 26, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ 1. Create a Bare Repo on Server `ssh kunal@domain.com` `mkdir website.git` `cd website.git` `git init --bare` 2. Create a Hook to copy files from the bare git directory to the nginx/apache website directory