Your SlideShare is downloading. ×
Gitosis on Mac OS X Server
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

Gitosis on Mac OS X Server

1,963
views

Published on

Published in: Technology

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,963
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
7
Comments
0
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. ‣‣‣‣‣‣‣‣
  • 2. master
  • 3. 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.txtnothing 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
  • 4. Awesome Terminal - bash - ⌘ 1$ git config -l # => svn infouser.name=grauwoelfchenuser.email=grauwoelfchen@gmail.comcolor.ui=auto # =>core.autocrlf=input # => LFcore.excludesfile=/Users/grauwoelfchen/.gitexclude # =>core.repositoryformatversion=0core.filemode=truecore.bare=falsecore.logallrefupdates=truecore.ignorecase=trueremote.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 # =>
  • 5. Awesome Terminal - bash - ⌘ 1$ git log -3 -p Gemfile # => ‘Gemfile’ 3commit 9d3f4bc38f2d89d98567af017cf0327626e4effaAuthor: grauwoelfchen <grauwoelfchen@gmail.com>Date: Sun Apr 3 23:39:49 2011 +0900 specified version of maruku gem.diff --git a/Gemfile b/Gemfileindex 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.0commit 878ecc909708a46dfc1c85b23ed2c344b5343032:
  • 6. Awesome Terminal - bash - ⌘ 1#$ git rev-list --all Gemfile | wc -l6#$ git blame Gemfile497c0e86 (jobs 2011-03-09 11:57:22 +0900 1) source :gemcutter497c0e86 (jobs 2011-03-09 11:57:22 +0900 2)878ecc90 (jobs 2011-03-22 03:20:17 +0900 3) gem sinatra, ~> 1.2.0497c0e86 (jobs 2011-03-09 11:57:22 +0900 4) gem haml, 3.0.25497c0e86 (jobs 2011-03-09 11:57:22 +0900 5) gem mongoid, 2.0.0.rc.7d2560ba3 (jobs 2011-03-21 11:59:52 +0900 6) gem bson_ext, ~> 1.2#$ git show HEAD~3 Gemfilecommit 9d3f4bc38f2d89d98567af017cf0327626e4effaAuthor: grauwoelfchen <grauwoelfchen@gmail.com>Date: Sun Apr 3 23:39:49 2011 +0900 specified version of maruku gem.diff --git a/Gemfile b/Gemfileindex 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
  • 7. Git/Mercurial/Bazaarsvn bzr hg ‥
  • 8. Awesome Terminal - bash - ⌘ 1# gitosis$ python --versionPython 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
  • 9. 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.pubInitialized 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
  • 10. Awesome Terminal - bash - ⌘ 1$ exitlogout[My LT completed]#