Xiao Peng

My personal blog moves to xiaopeng.me , blogs about design patterns will be synced to here.
肖鹏,ThoughtWorks资深咨询师,目前关注于架构模式、敏捷软件开发等领域,并致力于软件开发最佳实践的推广和应用。
多次为国内大型企业敏捷组织转型提供咨询和培训服务,在大型团队持续集成方面具有丰富的经验。
  博客园  :: 首页  :: 联系 :: 订阅 订阅  :: 管理

Create a git repository on Dreamhost

Posted on 2011-01-30 17:34  勇敢的鸵鸟  阅读(342)  评论(0编辑  收藏  举报
[sourcecode language="bash"] $ cd ~ # create a dir for your repositories $ mkdir git-repos # create a dir for your project e.g. depot $ mkdir depot.git $ init the dir $ git --bare init $ cd .. # create a tmp folder for testing $ mkdir tmp $ cd tmp # clone to tmp folder $ git clone file:///home/yourname/git-repos/depot.git # done! [/sourcecode] [sourcecode language="bash" wraplines="true"] # If you want to clone it to you computer, $ git clone ssh://pxiao@xiaopeng.me/home/yourname/git-repos/depot.git # If you already have this folder, you may want to checkin your local code into that repository: $ git clone ssh://pxiao@xiaopeng.me/home/yourname/git-repos/depot.git depot-temp $ mv depot-temp/.git depot/ $ cd depot $ git status $ git config user.name "pxiao" $ git config user.email "eagle.xiao@gmail.com" # ignore something $ vi .gitignore # input: .idea \n .idea/**/* $ git add .gitignore $ git commit .gitignore -m "commit .gitignore" # commit other files $ git add . $ git commit -a -m "initial rev" # here -a means 'all' not 'add' $ git push origin master [/sourcecode]