Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1064054
  • 博文数量: 284
  • 博客积分: 8223
  • 博客等级: 中将
  • 技术积分: 3188
  • 用 户 组: 普通用户
  • 注册时间: 2008-12-01 13:26
文章分类

全部博文(284)

文章存档

2012年(18)

2011年(33)

2010年(83)

2009年(147)

2008年(3)

分类: Java

2011-02-20 23:21:28

   今天在unfuddle上申请了一个号,用来测试git版本管理功能。完成了配置感觉其他都OK,就是国外的服务器,速度慢了点,不过咱忍了,谁让这东西免费呢。下面把unfuddle的配置help贴在下面,作为今天的总结。特别说明下,用户名为toydavid..
   Getting Started with Git
  • ,
  • ,
  • ,
  • ,
  Introduction top

   Git is a distributed version control system, originally developed by Linus Torvalds for Linux kernel development. It has grown over the years to serve as the development platform for many other very large and active open source projects. It has grown for a very simple reason: it is excellent.

   Once you have the Git client installed on your development machine, accessing your repository is simple.

  Authentication top

   Unfuddle offers you secure, direct access to your Git repositories over SSH.

   Unfuddle will authenticate all access to your repositories using a public key cryptography over SSH. As such, you must first create a keypair locally on your machine and paste the contents of your public key into your "Personal Settings". For more information on how to generate a public key, please see .

   这里注意一点,就是生成ssh 可以后,将pubkey放到网站的设置里面,然后本地.ssh目录保留相应的key,但是要让key生效,必须将ssh进程重启,或者指明key的文件,本人就是因为没有重启服务,结果折腾了半天。。。

   另外,ssh的密钥要放在ssh本地用户的目录下,比如用户toydavid,就应该放在/home/toydavid/.ssh下面。

  Importing top Local Repository Creation

   If you are loading up your Git repository for the first time, you will first need to create a local Git repository on your machine by doing the following:

$ mkdir /path/to/repository
$ cd /path/to/repository
$ git init

   Once you have created a Git repository, it's time associate the Unfuddle repository with your local one and designate it as an upstream server.

$ cd /path/to/repository
$ git remote add unfuddle git@toydavid.unfuddle.com:toydavid/toydavid.git
$ git config remote.unfuddle.push refs/heads/master:refs/heads/master

   Before you can push your code to the Unfuddle repository you must be sure to add your files to the local index then commit them.

$ git add *
$ git commit -am 'initial commit'

   Finally, you are now ready to push any locally made commits to your newly created Unfuddle Git repository.

$ git push unfuddle master

   Congratulations! You should now see all of your commits and files within your Unfuddle repository up online. Other members of your project may now clone the repository.

   NOTE: Unlike Subversion, it is not possible to clone a brand new repository. You must first push data to it and only then it can be cloned by others.

  Cloning top

   If your Git repository has already been populated with some commits, then it is now possible to clone that repository onto any number of machines.

$ git clone
阅读(2869) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~