SlideShare a Scribd company logo
Gitosis on Mac OS X Server
Gitosis on Mac OS X Server
‣
‣
‣
‣

‣
‣
‣
‣
Gitosis on Mac OS X Server
Gitosis on Mac OS X Server
Gitosis on Mac OS X Server
Gitosis on Mac OS X Server
master
Gitosis on Mac OS X Server
Awesome Terminal - bash - ⌘ 1

$ mkdir test && cd test
$ git init    # =>
Initialized empty Git repository in /path/to/test/.git/
$ echo test > test.txt
$ git status # =>
# On branch master
#
# Initial commit
#
# Untracked files:
#    (use "git add <file>..." to include in what will be committed)
#
# test.txt
nothing added to commit but untracked files present (use "git add" to track)
$ git add -A # =>
$ git status # =>
# On branch master
#
# Initial commit
#
# Changes to be committed:
#    (use "git rm --cached <file>..." to unstage)
#
# new file:     test.txt
#
$ git commit -m ‘created test.txt’ -m ‘initial commit !’ # =>
[master (root-commit) a7d81b8] created test.txt
  1 files changed, 1 insertions(+), 0 deletions(-)
  create mode 100644 test.txt
Gitosis on Mac OS X Server
Awesome Terminal - bash - ⌘ 1

$ git config -l       # => svn info
user.name=grauwoelfchen
user.email=grauwoelfchen@gmail.com
color.ui=auto         # =>
core.autocrlf=input   # =>                     LF
core.excludesfile=/Users/grauwoelfchen/.gitexclude # =>
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
core.ignorecase=true
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
remote.origin.url=git@github.com:foo.git   # =>
remote.moxssg.fetch=+refs/heads/*:refs/remotes/moxssg/*
remote.moxssg.url=git@example.com:foo.git # =>
Awesome Terminal - bash - ⌘ 1

$ git log -3 -p Gemfile # => ‘Gemfile’                    3
commit 9d3f4bc38f2d89d98567af017cf0327626e4effa
Author: grauwoelfchen <grauwoelfchen@gmail.com>
Date:   Sun Apr 3 23:39:49 2011 +0900

    specified version of maruku gem.

diff --git a/Gemfile b/Gemfile
index 99fa1f0..df7bac2 100644
--- a/Gemfile
+++ b/Gemfile
@@ -7,7 +7,7 @@ gem 'bson_ext', '~> 1.2'
 gem 'data_mapper'
 gem 'mongoid_taggable'
 gem 'will_paginate', '~> 3.0.pre2'
-gem 'maruku'
+gem 'maruku', '~> 0.6.0'

  group :development do
    gem 'rspec', '2.5.0'
commit 878ecc909708a46dfc1c85b23ed2c344b5343032
:
Awesome Terminal - bash - ⌘ 1
#
$ git rev-list --all Gemfile | wc -l
6
#
$ git blame Gemfile
497c0e86 (jobs 2011-03-09   11:57:22   +0900    1)   source :gemcutter
497c0e86 (jobs 2011-03-09   11:57:22   +0900    2)
878ecc90 (jobs 2011-03-22   03:20:17   +0900    3)   gem   'sinatra',    '~> 1.2.0'
497c0e86 (jobs 2011-03-09   11:57:22   +0900    4)   gem   'haml',       '3.0.25'
497c0e86 (jobs 2011-03-09   11:57:22   +0900    5)   gem   'mongoid',    '2.0.0.rc.7'
d2560ba3 (jobs 2011-03-21   11:59:52   +0900    6)   gem   'bson_ext',   '~> 1.2'

#
$ git show HEAD~3 Gemfile
commit 9d3f4bc38f2d89d98567af017cf0327626e4effa
Author: grauwoelfchen <grauwoelfchen@gmail.com>
Date:   Sun Apr 3 23:39:49 2011 +0900

    specified version of maruku gem.

diff --git a/Gemfile b/Gemfile
index 99fa1f0..df7bac2 100644
--- a/Gemfile
+++ b/Gemfile
@@ -7,7 +7,7 @@ gem 'bson_ext', '~> 1.2'
 gem 'data_mapper'
-gem 'maruku'
+gem 'maruku', '~> 0.6.0'
Gitosis on Mac OS X Server
Git/Mercurial/Bazaar




svn       bzr                hg   ‥
Gitosis on Mac OS X Server
Gitosis on Mac OS X Server
Gitosis on Mac OS X Server
Gitosis on Mac OS X Server
Gitosis on Mac OS X Server
Awesome Terminal - bash - ⌘ 1

# gitosis
$ python --version
Python 2.5.1
$ git clone git://eagain.net/gitosis.git
$ cd gitosis
$ sudo python setup.py install
...

#
#   dscl . -create /Users/git
#   dscl . -create /Users/git   UserShell /bin/bash
#   dscl . -create /Users/git   RealName "git"
#   dscl . -create /Users/git   NFSHomeDirectory /Users/git
#   dscl . -create /Users/git   UniqueID xxx
#   dscl . -create /Users/git   PrimaryGroupID xxx
#   createhomedir -b -u git
Awesome Terminal - bash - ⌘ 1

#
$ ln -s /srv/repos/git /Users/git/repositories
$ sudo chown -R git /Users/git/repositories

#          (                       )
$ scp ~/.ssh/id_rsa.pub admin@example.com:/tmp/git           # =>
...

# gitosis
$ sudo -H -u git gitosis-init < /path/to/id_rsa.pub
Initialized empty Git repository in /srv/repos/git/gitosis-admin.git/
Reinitialized existing Git repository in /srv/repos/git/gitosis-admin.git/
...

# post-update
$ sudo chmod 755 /srv/repos/git/gitosis-admin.git/hooks/post-updat

#   git            PATH
$   touch ~/.bashrc
$   echo PATH=/usr/local/bin:$PATH > .bashrc       # => brew install git
$   echo export PATH >> .bashrc

#                 !!
#
$ sudo demo
Awesome Terminal - bash - ⌘ 1

$ exit
logout

[My LT completed]




#

More Related Content

KEY
Clojure + MongoDB on Heroku
PDF
Productivity tips for developers
PDF
GoLang & GoatCore
PDF
Gogo shell
PPTX
agri inventory - nouka data collector / yaoya data convertor
DOCX
Basic command for linux
PDF
Biicode OpenExpoDay
PDF
Augeas
Clojure + MongoDB on Heroku
Productivity tips for developers
GoLang & GoatCore
Gogo shell
agri inventory - nouka data collector / yaoya data convertor
Basic command for linux
Biicode OpenExpoDay
Augeas

What's hot (20)

ODP
NUMOSS 4th Week - Commandline Tutorial
ODP
Linux Command Line
PDF
Git walkthrough
PPTX
Comets notes
PDF
Containers for sysadmins
PDF
Devinsampa nginx-scripting
PDF
My First Source Code
PDF
Andrey Listochkin "Everybody stand back! I know regular expressions"
PPTX
Cis 216 – shell scripting
PDF
Ansible, Simplicity, and the Zen of Python
PDF
nouka inventry manager
PDF
Capistrano Rails
PDF
Introduction to Resque
PDF
PDF
Git Quick Intro
PDF
Kubernetes + Docker + Elixir - Alexei Sholik, Andrew Dryga | Elixir Club Ukraine
PPTX
Linux basic3
PPTX
Process monitoring in UNIX shell scripting
PDF
PDF
Container Security
NUMOSS 4th Week - Commandline Tutorial
Linux Command Line
Git walkthrough
Comets notes
Containers for sysadmins
Devinsampa nginx-scripting
My First Source Code
Andrey Listochkin "Everybody stand back! I know regular expressions"
Cis 216 – shell scripting
Ansible, Simplicity, and the Zen of Python
nouka inventry manager
Capistrano Rails
Introduction to Resque
Git Quick Intro
Kubernetes + Docker + Elixir - Alexei Sholik, Andrew Dryga | Elixir Club Ukraine
Linux basic3
Process monitoring in UNIX shell scripting
Container Security
Ad

Similar to Gitosis on Mac OS X Server (20)

PDF
GTFO: Git Theory For OpenSource
PDF
Git and github 101
PPTX
git internals
PDF
Loading...git
PPTX
PDF
Cool Git Tricks (That I Learn When Things Go Badly) [1/2]
PPTX
Get Good With Git
PDF
GIT - GOOD PRACTICES
PDF
Git for beginners
DOCX
GitSetupLinux
DOCX
Git setuplinux
PDF
Introducción a git y GitHub
PDF
Version Control Systems with git (and github) as an example
PPTX
Intro to Git DevOps Tally Presentation 101615
PDF
Git Concepts, Commands and Connectivity
ODP
DrupalCafe5 VCS
PDF
Introduction to GIT
PDF
GIT_In_90_Minutes
PDF
Git_real_slides
PDF
Git real slides
GTFO: Git Theory For OpenSource
Git and github 101
git internals
Loading...git
Cool Git Tricks (That I Learn When Things Go Badly) [1/2]
Get Good With Git
GIT - GOOD PRACTICES
Git for beginners
GitSetupLinux
Git setuplinux
Introducción a git y GitHub
Version Control Systems with git (and github) as an example
Intro to Git DevOps Tally Presentation 101615
Git Concepts, Commands and Connectivity
DrupalCafe5 VCS
Introduction to GIT
GIT_In_90_Minutes
Git_real_slides
Git real slides
Ad

Recently uploaded (20)

PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Approach and Philosophy of On baking technology
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
cuic standard and advanced reporting.pdf
PDF
Encapsulation theory and applications.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Digital-Transformation-Roadmap-for-Companies.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Spectral efficient network and resource selection model in 5G networks
Per capita expenditure prediction using model stacking based on satellite ima...
Understanding_Digital_Forensics_Presentation.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
Unlocking AI with Model Context Protocol (MCP)
Approach and Philosophy of On baking technology
The AUB Centre for AI in Media Proposal.docx
Diabetes mellitus diagnosis method based random forest with bat algorithm
Reach Out and Touch Someone: Haptics and Empathic Computing
20250228 LYD VKU AI Blended-Learning.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
cuic standard and advanced reporting.pdf
Encapsulation theory and applications.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Dropbox Q2 2025 Financial Results & Investor Presentation
MIND Revenue Release Quarter 2 2025 Press Release
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy

Gitosis on Mac OS X Server

  • 10. Awesome Terminal - bash - ⌘ 1 $ mkdir test && cd test $ git init # => Initialized empty Git repository in /path/to/test/.git/ $ echo test > test.txt $ git status # => # On branch master # # Initial commit # # Untracked files: # (use "git add <file>..." to include in what will be committed) # # test.txt nothing added to commit but untracked files present (use "git add" to track) $ git add -A # => $ git status # => # On branch master # # Initial commit # # Changes to be committed: # (use "git rm --cached <file>..." to unstage) # # new file: test.txt # $ git commit -m ‘created test.txt’ -m ‘initial commit !’ # => [master (root-commit) a7d81b8] created test.txt 1 files changed, 1 insertions(+), 0 deletions(-) create mode 100644 test.txt
  • 12. Awesome Terminal - bash - ⌘ 1 $ git config -l # => svn info user.name=grauwoelfchen user.email=grauwoelfchen@gmail.com color.ui=auto # => core.autocrlf=input # => LF core.excludesfile=/Users/grauwoelfchen/.gitexclude # => core.repositoryformatversion=0 core.filemode=true core.bare=false core.logallrefupdates=true core.ignorecase=true remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* remote.origin.url=git@github.com:foo.git # => remote.moxssg.fetch=+refs/heads/*:refs/remotes/moxssg/* remote.moxssg.url=git@example.com:foo.git # =>
  • 13. Awesome Terminal - bash - ⌘ 1 $ git log -3 -p Gemfile # => ‘Gemfile’ 3 commit 9d3f4bc38f2d89d98567af017cf0327626e4effa Author: grauwoelfchen <grauwoelfchen@gmail.com> Date: Sun Apr 3 23:39:49 2011 +0900 specified version of maruku gem. diff --git a/Gemfile b/Gemfile index 99fa1f0..df7bac2 100644 --- a/Gemfile +++ b/Gemfile @@ -7,7 +7,7 @@ gem 'bson_ext', '~> 1.2' gem 'data_mapper' gem 'mongoid_taggable' gem 'will_paginate', '~> 3.0.pre2' -gem 'maruku' +gem 'maruku', '~> 0.6.0' group :development do gem 'rspec', '2.5.0' commit 878ecc909708a46dfc1c85b23ed2c344b5343032 :
  • 14. Awesome Terminal - bash - ⌘ 1 # $ git rev-list --all Gemfile | wc -l 6 # $ git blame Gemfile 497c0e86 (jobs 2011-03-09 11:57:22 +0900 1) source :gemcutter 497c0e86 (jobs 2011-03-09 11:57:22 +0900 2) 878ecc90 (jobs 2011-03-22 03:20:17 +0900 3) gem 'sinatra', '~> 1.2.0' 497c0e86 (jobs 2011-03-09 11:57:22 +0900 4) gem 'haml', '3.0.25' 497c0e86 (jobs 2011-03-09 11:57:22 +0900 5) gem 'mongoid', '2.0.0.rc.7' d2560ba3 (jobs 2011-03-21 11:59:52 +0900 6) gem 'bson_ext', '~> 1.2' # $ git show HEAD~3 Gemfile commit 9d3f4bc38f2d89d98567af017cf0327626e4effa Author: grauwoelfchen <grauwoelfchen@gmail.com> Date: Sun Apr 3 23:39:49 2011 +0900 specified version of maruku gem. diff --git a/Gemfile b/Gemfile index 99fa1f0..df7bac2 100644 --- a/Gemfile +++ b/Gemfile @@ -7,7 +7,7 @@ gem 'bson_ext', '~> 1.2' gem 'data_mapper' -gem 'maruku' +gem 'maruku', '~> 0.6.0'
  • 22. Awesome Terminal - bash - ⌘ 1 # gitosis $ python --version Python 2.5.1 $ git clone git://eagain.net/gitosis.git $ cd gitosis $ sudo python setup.py install ... # # dscl . -create /Users/git # dscl . -create /Users/git UserShell /bin/bash # dscl . -create /Users/git RealName "git" # dscl . -create /Users/git NFSHomeDirectory /Users/git # dscl . -create /Users/git UniqueID xxx # dscl . -create /Users/git PrimaryGroupID xxx # createhomedir -b -u git
  • 23. Awesome Terminal - bash - ⌘ 1 # $ ln -s /srv/repos/git /Users/git/repositories $ sudo chown -R git /Users/git/repositories # ( ) $ scp ~/.ssh/id_rsa.pub admin@example.com:/tmp/git # => ... # gitosis $ sudo -H -u git gitosis-init < /path/to/id_rsa.pub Initialized empty Git repository in /srv/repos/git/gitosis-admin.git/ Reinitialized existing Git repository in /srv/repos/git/gitosis-admin.git/ ... # post-update $ sudo chmod 755 /srv/repos/git/gitosis-admin.git/hooks/post-updat # git PATH $ touch ~/.bashrc $ echo PATH=/usr/local/bin:$PATH > .bashrc # => brew install git $ echo export PATH >> .bashrc # !! # $ sudo demo
  • 24. Awesome Terminal - bash - ⌘ 1 $ exit logout [My LT completed] #