配置git

原文见:http://www.nonease.com/archlinux-config-git.html/

 

$ sudo pacman -S git bash-completion tk //安装git
//千万不要使用sudo来git config否则会出现权限问题无法clone/push等一切操作
$ git config --global core.editor "vim" //配置编辑器
$ git config --global user.name "xxoo"  //告诉git你的用户名
$ git config --global user.name "xxoo@xxoo.com"//告诉git你的邮箱
$ git config --global color.ui true //好象是设置ui颜色
$ git config --global --list //列出~/.gitconfig的所有配置
$ cd ~/.ssh
$ ls  //显示id_rsa 密匙  id_rsa.pub 公匙  known_hosts ssh的链接记录
$ rm id_rsa*
$ ssh-keygen -t rsa -C "xxoo@xxoo.com"
$ sudo pacman -S xclip
$ xclip -sel clip < ~/.ssh/id_rsa.pub
//去github->Account->Settings->SSH Keys->粘帖公匙,标题不用管
$ ssh -T git@github.com ->yes->enter
$ cd ~/xxoo //去项目目录去git吧

 

posted on 2013-01-07 13:37  红色原野  阅读(234)  评论(0编辑  收藏  举报

导航