SlideShare a Scribd company logo
1 of 24
Download to read offline
‣
‣
‣
‣

‣
‣
‣
‣
master
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
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'
Git/Mercurial/Bazaar




svn       bzr                hg   ‥
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

What's hot

NUMOSS 4th Week - Commandline Tutorial
NUMOSS 4th Week - Commandline TutorialNUMOSS 4th Week - Commandline Tutorial
NUMOSS 4th Week - Commandline TutorialGagah Arifianto
 
Devinsampa nginx-scripting
Devinsampa nginx-scriptingDevinsampa nginx-scripting
Devinsampa nginx-scriptingTony Fabeen
 
My First Source Code
My First Source CodeMy First Source Code
My First Source Codeenidcruz
 
Andrey Listochkin "Everybody stand back! I know regular expressions"
Andrey Listochkin "Everybody stand back! I know regular expressions"Andrey Listochkin "Everybody stand back! I know regular expressions"
Andrey Listochkin "Everybody stand back! I know regular expressions"Fwdays
 
Cis 216 – shell scripting
Cis 216 – shell scriptingCis 216 – shell scripting
Cis 216 – shell scriptingDan Morrill
 
Ansible, Simplicity, and the Zen of Python
Ansible, Simplicity, and the Zen of PythonAnsible, Simplicity, and the Zen of Python
Ansible, Simplicity, and the Zen of Pythontoddmowen
 
nouka inventry manager
nouka inventry managernouka inventry manager
nouka inventry managerToshiaki Baba
 
Introduction to Resque
Introduction to ResqueIntroduction to Resque
Introduction to Resquekoshigoe
 
Kubernetes + Docker + Elixir - Alexei Sholik, Andrew Dryga | Elixir Club Ukraine
Kubernetes + Docker + Elixir - Alexei Sholik, Andrew Dryga | Elixir Club UkraineKubernetes + Docker + Elixir - Alexei Sholik, Andrew Dryga | Elixir Club Ukraine
Kubernetes + Docker + Elixir - Alexei Sholik, Andrew Dryga | Elixir Club UkraineElixir Club
 
Process monitoring in UNIX shell scripting
Process monitoring in UNIX shell scriptingProcess monitoring in UNIX shell scripting
Process monitoring in UNIX shell scriptingDan Morrill
 
Container Security
Container SecurityContainer Security
Container Securityamouat
 

What's hot (20)

NUMOSS 4th Week - Commandline Tutorial
NUMOSS 4th Week - Commandline TutorialNUMOSS 4th Week - Commandline Tutorial
NUMOSS 4th Week - Commandline Tutorial
 
Linux Command Line
Linux Command LineLinux Command Line
Linux Command Line
 
Git walkthrough
Git walkthroughGit walkthrough
Git walkthrough
 
Comets notes
Comets notesComets notes
Comets notes
 
Containers for sysadmins
Containers for sysadminsContainers for sysadmins
Containers for sysadmins
 
Devinsampa nginx-scripting
Devinsampa nginx-scriptingDevinsampa nginx-scripting
Devinsampa nginx-scripting
 
My First Source Code
My First Source CodeMy First Source Code
My First Source Code
 
Andrey Listochkin "Everybody stand back! I know regular expressions"
Andrey Listochkin "Everybody stand back! I know regular expressions"Andrey Listochkin "Everybody stand back! I know regular expressions"
Andrey Listochkin "Everybody stand back! I know regular expressions"
 
Cis 216 – shell scripting
Cis 216 – shell scriptingCis 216 – shell scripting
Cis 216 – shell scripting
 
Ansible, Simplicity, and the Zen of Python
Ansible, Simplicity, and the Zen of PythonAnsible, Simplicity, and the Zen of Python
Ansible, Simplicity, and the Zen of Python
 
nouka inventry manager
nouka inventry managernouka inventry manager
nouka inventry manager
 
Capistrano Rails
Capistrano RailsCapistrano Rails
Capistrano Rails
 
Introduction to Resque
Introduction to ResqueIntroduction to Resque
Introduction to Resque
 
clonehd01
clonehd01clonehd01
clonehd01
 
Git Quick Intro
Git Quick IntroGit Quick Intro
Git Quick Intro
 
Kubernetes + Docker + Elixir - Alexei Sholik, Andrew Dryga | Elixir Club Ukraine
Kubernetes + Docker + Elixir - Alexei Sholik, Andrew Dryga | Elixir Club UkraineKubernetes + Docker + Elixir - Alexei Sholik, Andrew Dryga | Elixir Club Ukraine
Kubernetes + Docker + Elixir - Alexei Sholik, Andrew Dryga | Elixir Club Ukraine
 
Linux basic3
Linux basic3Linux basic3
Linux basic3
 
Process monitoring in UNIX shell scripting
Process monitoring in UNIX shell scriptingProcess monitoring in UNIX shell scripting
Process monitoring in UNIX shell scripting
 
EC2
EC2EC2
EC2
 
Container Security
Container SecurityContainer Security
Container Security
 

Similar to Gitosis on Mac OS X Server

GTFO: Git Theory For OpenSource
GTFO: Git Theory For OpenSourceGTFO: Git Theory For OpenSource
GTFO: Git Theory For OpenSourceForest Mars
 
Cool Git Tricks (That I Learn When Things Go Badly) [1/2]
Cool Git Tricks (That I Learn When Things Go Badly) [1/2]Cool Git Tricks (That I Learn When Things Go Badly) [1/2]
Cool Git Tricks (That I Learn When Things Go Badly) [1/2]Carina C. Zona
 
Get Good With Git
Get Good With GitGet Good With Git
Get Good With GitHoffman Lab
 
Git for beginners
Git for beginnersGit for beginners
Git for beginnersVinh Nguyen
 
Introducción a git y GitHub
Introducción a git y GitHubIntroducción a git y GitHub
Introducción a git y GitHubLucas Videla
 
Version Control Systems with git (and github) as an example
Version Control Systems with git (and github) as an exampleVersion Control Systems with git (and github) as an example
Version Control Systems with git (and github) as an exampleGaurav Kumar Garg
 
Intro to Git DevOps Tally Presentation 101615
Intro to Git DevOps Tally Presentation 101615Intro to Git DevOps Tally Presentation 101615
Intro to Git DevOps Tally Presentation 101615Brian K. Vagnini
 
Git Concepts, Commands and Connectivity
Git Concepts, Commands and ConnectivityGit Concepts, Commands and Connectivity
Git Concepts, Commands and ConnectivityRaja Soundaramourty
 

Similar to Gitosis on Mac OS X Server (20)

GTFO: Git Theory For OpenSource
GTFO: Git Theory For OpenSourceGTFO: Git Theory For OpenSource
GTFO: Git Theory For OpenSource
 
Git and github 101
Git and github 101Git and github 101
Git and github 101
 
git internals
git internalsgit internals
git internals
 
Loading...git
Loading...gitLoading...git
Loading...git
 
Git
GitGit
Git
 
Cool Git Tricks (That I Learn When Things Go Badly) [1/2]
Cool Git Tricks (That I Learn When Things Go Badly) [1/2]Cool Git Tricks (That I Learn When Things Go Badly) [1/2]
Cool Git Tricks (That I Learn When Things Go Badly) [1/2]
 
Get Good With Git
Get Good With GitGet Good With Git
Get Good With Git
 
GIT - GOOD PRACTICES
GIT - GOOD PRACTICESGIT - GOOD PRACTICES
GIT - GOOD PRACTICES
 
Git for beginners
Git for beginnersGit for beginners
Git for beginners
 
Git setuplinux
Git setuplinuxGit setuplinux
Git setuplinux
 
GitSetupLinux
GitSetupLinuxGitSetupLinux
GitSetupLinux
 
Introducción a git y GitHub
Introducción a git y GitHubIntroducción a git y GitHub
Introducción a git y GitHub
 
Version Control Systems with git (and github) as an example
Version Control Systems with git (and github) as an exampleVersion Control Systems with git (and github) as an example
Version Control Systems with git (and github) as an example
 
Intro to Git DevOps Tally Presentation 101615
Intro to Git DevOps Tally Presentation 101615Intro to Git DevOps Tally Presentation 101615
Intro to Git DevOps Tally Presentation 101615
 
Git Concepts, Commands and Connectivity
Git Concepts, Commands and ConnectivityGit Concepts, Commands and Connectivity
Git Concepts, Commands and Connectivity
 
DrupalCafe5 VCS
DrupalCafe5 VCSDrupalCafe5 VCS
DrupalCafe5 VCS
 
Introduction to GIT
Introduction to GITIntroduction to GIT
Introduction to GIT
 
GIT_In_90_Minutes
GIT_In_90_MinutesGIT_In_90_Minutes
GIT_In_90_Minutes
 
Git real slides
Git real slidesGit real slides
Git real slides
 
Git_real_slides
Git_real_slidesGit_real_slides
Git_real_slides
 

Recently uploaded

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 

Recently uploaded (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

Gitosis on Mac OS X Server

  • 1.
  • 2.
  • 4.
  • 5.
  • 6.
  • 7.
  • 9.
  • 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
  • 11.
  • 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'
  • 15.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 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] #