ssh-keygen -t rsa -C "email@email.com"而后复制~/.ssh/id_rsa.pub的内容至github公钥,添加新的公钥,标题任意,公钥的内容为id_rsa.pub的内容
git config --global user.name "7color" git config --global user.email email@email.com3.建立版本库目录
mkdir 7color.github.com
4.切换至版本库目录 html
cd 7color.github.com
git init6.新建文件README
touch README
git add README
git commit -m "first commit" git show #显示最后一次commit修改的内容
9.建立远程主机的标记7color python
git remote add 7color(origin) git@github.com:xixer/7color.github.com.git
10.从7color标记(指定)的remote(远程主机)获取最新的版本到本地,并自动进行merge到本地当前分支上(fetch+merge) linux
git pull 7color master11.提交本地master分支的全部的修改至7color标记(指向)的remote(远程主机)的master分支
git push 7color master
[user] name = 7color email = email@email.com *或者* git config --global user.name "7color" git config --global user.email email@email.com
解决方法: 在github.com的管理员页面,切换当前分支,再次运行删除分支命令便可.
解决方法: ssh-keygen -t rsa -C "email@email.com" 复制~/.ssh/id_rsa.pub内容 打开githu.com->帐户设置->SSH公钥->添加新的公钥,保存 ssh-add 完
解决方法: ssh -v git@github.com,若是出现successfully authenticated即表示公钥配置成功. 若是你同时安装了Git & TortoiseGit,可使用echo $GIT_SSH查看ssh链接方式. 使用其中一种方式,declare GIT_SSH="D:\Git\bin\sh.exe",再次echo $GIT_SSH查看是否修改为功.接着再次push试试,应该就能够了. 若是想一劳永逸的作法是个人电脑->高级->环境变量中添加/修改GIT_SSH的值.而后重启电脑.
解决方法: 使用puttygen.exe生成的private key复制到github.com的共钥中便可. "To git@github.com:7color/7color.github.com.git ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'git@github.com:7color/7color.github.com.git' To prevent you from losing history, non-fast-forward updates were rejected Merge the remote changes (e.g. 'git pull') before pushing again.
解决方法: git pull 7color master 编辑冲突 git commit -am "resolve conflict" git push 7color master 完
资源连接 http://v.youku.com/v_playlist/f5227985o1p0.html 视频 http://wangcongming.info/category/geek-tweak/ git-系列(推荐) http://roclinux.cn/?p=2115#more-2115 看日记学git http://wenku.baidu.com/search?word=git&lm=0&od=0 百度文库 http://git-scm.com/ http://hi.baidu.com/felixwang/blog/item/7ce2cf1b2fccf7fdaf51338b.html 使用public/private key让putty(ssh)自动登陆 http://www.kudelabs.com/2008/09/24/mysmgit-%E4%B9%8Bgit-on-windows%E5%BF%AB%E9%80%9F%E4%B8%8A%E6%89%8B mysmGit 之Git on Windows快速上手 http://www.ha97.com/book/OpenSource_Guide/ch28s05.html git命令入门 http://help.github.com/msysgit-key-setup/ ssh keygen http://pages.github.com/ git pages http://eshilin.blog.163.com/blog/static/13288033020106610250138/ Git startup http://eshilin.blog.163.com/blog/static/132880330201066102650433/ Git branch http://eshilin.blog.163.com/blog/static/132880330201062991718683/ Git hook book http://rongjih.blog.163.com/blog/static/335744612010619111042465/ TortoiseGit密钥的配置