安装TortoiseGit和中文语言包
PuTTY生成ssh key 主要生成过程移动鼠标更快
把生成的私密保存成ppk类型文件,复制sshkey绑定到github.com
安装windows for github
bash下操作
git clone https://github.com/logoove/logoove.github.com.git 复制到本地 git remote add origin git@github.com:logoove/weui2.git
登录
git push -u origin master
ssh-keygen -t rsa -C "logove@qq.com" 建立本地ssh key 然后查看.pub文件复制里面所有内容到github主页进入Account Settings,左边选择SSH Keys,Add SSH Key,title随便填,粘贴key。 接着输入ssh -T git@github.com
git config --global user.name "logoove"
git config --global user.email "logove@qq.com"
修改远程地址
git remote add origin git@github.com:logoove/logoove.github.com.git
添加注释 git add ./ -a 记录删除或修改 git commit -m "first commit"
git push origin master 上传
git pull origin master 更新
192.30.252.130 github.com 添加到hosts
Pages只需要创建分支gh-pages
在一个新目录内打开bash输入git init
克隆一个项目git clone https://github.com/logoove/prize.git
重看文件状态git status -s
添加文件git add .
添加当前目录 * 代表递归添加
提交git commit -m "描述"
推送git push origin master
配置
git config --global user.name "logoove"
git config --global user.email "logove@qq.com"
创建分支git branch 分支名字
删除git branch -d 分支名字
切换分支git branch
合并分支git merge 分支名
显示分支提交记录git log
linux安装git git --version
yum -y install zlib-devel openssl-devel perl hg cpio expat-devel gettext-devel curl curl-devel perl-ExtUtils-MakeMaker hg wget gcc gcc-c++ #安装依赖包
wget https://www.kernel.org/pub/software/scm/git/ #下载
tar zxvf git-2.6.0.tar.gz #解压
cd git-2.6.0 #编译
./configure --prefix=/usr/local/git
make
make install