Versiebeheer van configuraties met Git: Difference between revisions
Jump to navigation
Jump to search
(New page: <hr/> Terug naar: Webhuis Support Infrastructuur) |
|||
| (11 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
= Branchen en Mergen = |
|||
Solved – git push – Your branch is ahead of origin/master by x commits |
|||
* http://www.magentodeveloperleedsuk.co.uk/solved-git-push-your-branch-is-ahead-of-origin-master/ |
|||
* http://www.freewayprojects.com/2011/11/solving-the-your-branch-is-ahead-of-originmaster-by-x-commits-issue-after-pulling-using-git/ |
|||
= Install = |
|||
De installatie is: |
|||
<pre> |
|||
root@wbhs-pkg:~# apt-get install git git-clone gitweb |
|||
root@wbhs-pkg:/var/www/git# mkdir /var/cache/git /var/www/git |
|||
</pre> |
|||
* http://www.howtoforge.com/how-to-install-a-public-git-repository-on-a-debian-server |
|||
* http://blog.tracy-ng.com/2012/06/setting-up-git-server-in-enterprise.html |
|||
* http://www.mabishu.com/blog/2011/02/09/setup-a-remote-git-repository-using-http-with-push-support-and-digest-auth/ |
|||
* http://gitblit.com/setup.html |
|||
Wachtwoord onthouden: |
|||
git config --global credential.helper cache |
|||
git config credential.helper store |
|||
== Apache == |
|||
<pre> |
|||
VirtualHost *:80> |
|||
ServerName wbhs-pkg.webhuis.nl |
|||
ServerAdmin martin@webhuis.nl |
|||
DocumentRoot /var/www/git |
|||
ErrorLog /var/log/apache2/wbhs-pkg.webhuis.nl-error.log |
|||
TransferLog /var/log/apache2/wbhs-pkg.webhuis.nl-access.log |
|||
<Directory /var/www/git> |
|||
Allow from all |
|||
AllowOverride all |
|||
Order allow,deny |
|||
Options ExecCGI |
|||
<Files gitweb.cgi> |
|||
SetHandler cgi-script |
|||
</Files> |
|||
</Directory> |
|||
DirectoryIndex gitweb.cgi |
|||
SetEnv GITWEB_CONFIG /etc/gitweb.conf |
|||
</VirtualHost> |
|||
</pre> |
|||
== gitweb == |
|||
<pre> |
|||
# path to git projects (<project>.git) |
|||
$projectroot = "/var/cache/git"; |
|||
# directory to use for temp files |
|||
$git_temp = "/tmp"; |
|||
# target of the home link on top of all pages |
|||
#$home_link = $my_uri || "/"; |
|||
# html text to include at home page |
|||
$home_text = "indextext.html"; |
|||
# file with project list; by default, simply scan the projectroot dir. |
|||
$projects_list = $projectroot; |
|||
# stylesheet to use |
|||
$stylesheet = "gitweb.css"; |
|||
# javascript code for gitweb |
|||
$javascript = "gitweb.js"; |
|||
# logo to use |
|||
$logo = "git-logo.png"; |
|||
# the 'favicon' |
|||
$favicon = "git-favicon.png"; |
|||
</pre> |
|||
== git daemon == |
|||
<pre> |
|||
root@wbhs-pkg:~# cd /var/cache/git |
|||
root@wbhs-pkg:/var/cache/git# touch .git/git-daemon-export-ok |
|||
root@wbhs-pkg:/var/cache/git# git daemon --base-path=/var/cache/git --detach --syslog --export-all |
|||
</pre> |
|||
Enable push |
|||
<pre> |
|||
root@wbhs-pkg:~# git daemon --reuseaddr --base-path=/var/cache/git --detach --syslog --export-all --verbose --enable=receive-pack |
|||
root@wbhs-pkg:~# git reset --hard |
|||
</pre> |
|||
<hr/> |
<hr/> |
||
Terug naar: [[Webhuis Support Infrastructuur]] |
Terug naar: [[Webhuis Support Infrastructuur]] |
||
Latest revision as of 13:19, 20 June 2016
Branchen en Mergen[edit]
Solved – git push – Your branch is ahead of origin/master by x commits
- http://www.magentodeveloperleedsuk.co.uk/solved-git-push-your-branch-is-ahead-of-origin-master/
- http://www.freewayprojects.com/2011/11/solving-the-your-branch-is-ahead-of-originmaster-by-x-commits-issue-after-pulling-using-git/
Install[edit]
De installatie is:
root@wbhs-pkg:~# apt-get install git git-clone gitweb root@wbhs-pkg:/var/www/git# mkdir /var/cache/git /var/www/git
- http://www.howtoforge.com/how-to-install-a-public-git-repository-on-a-debian-server
- http://blog.tracy-ng.com/2012/06/setting-up-git-server-in-enterprise.html
- http://www.mabishu.com/blog/2011/02/09/setup-a-remote-git-repository-using-http-with-push-support-and-digest-auth/
- http://gitblit.com/setup.html
Wachtwoord onthouden:
git config --global credential.helper cache git config credential.helper store
Apache[edit]
VirtualHost *:80>
ServerName wbhs-pkg.webhuis.nl
ServerAdmin martin@webhuis.nl
DocumentRoot /var/www/git
ErrorLog /var/log/apache2/wbhs-pkg.webhuis.nl-error.log
TransferLog /var/log/apache2/wbhs-pkg.webhuis.nl-access.log
<Directory /var/www/git>
Allow from all
AllowOverride all
Order allow,deny
Options ExecCGI
<Files gitweb.cgi>
SetHandler cgi-script
</Files>
</Directory>
DirectoryIndex gitweb.cgi
SetEnv GITWEB_CONFIG /etc/gitweb.conf
</VirtualHost>
gitweb[edit]
# path to git projects (<project>.git) $projectroot = "/var/cache/git"; # directory to use for temp files $git_temp = "/tmp"; # target of the home link on top of all pages #$home_link = $my_uri || "/"; # html text to include at home page $home_text = "indextext.html"; # file with project list; by default, simply scan the projectroot dir. $projects_list = $projectroot; # stylesheet to use $stylesheet = "gitweb.css"; # javascript code for gitweb $javascript = "gitweb.js"; # logo to use $logo = "git-logo.png"; # the 'favicon' $favicon = "git-favicon.png";
git daemon[edit]
root@wbhs-pkg:~# cd /var/cache/git root@wbhs-pkg:/var/cache/git# touch .git/git-daemon-export-ok root@wbhs-pkg:/var/cache/git# git daemon --base-path=/var/cache/git --detach --syslog --export-all
Enable push
root@wbhs-pkg:~# git daemon --reuseaddr --base-path=/var/cache/git --detach --syslog --export-all --verbose --enable=receive-pack root@wbhs-pkg:~# git reset --hard
Terug naar: Webhuis Support Infrastructuur