-
Notifications
You must be signed in to change notification settings - Fork 0
git
TuPengXiong edited this page Oct 25, 2016
·
10 revisions
ssh-keygen -t rsa -f ~/.ssh/id_rsa.github -C "511980432@qq.com"
cat ~/.ssh/id_rsa.github.pub
vi ~/.ssh/config
Host kingsilk
Hostname git.kingsilk.xyz
IdentityFile ~/.ssh/id_rsa
User tpx
Host github
Hostname github.com
IdentityFile ~/.ssh/id_rsa.github
User tpx
TuPengXiong.github.io
git clone git@github.com:TuPengXiong/TuPengXiong.github.io.git
cd TuPengXiong.github.io
git config user.name "xxxx"
git config user.email "511980432@qq.com" # 很重要,否则,个人github主页显示不了活动记录
echo Hello World > index.html git add index.html git commit -m "init github pages" git push
# github pages https://pages.github.com/
-
正向
本地文件 add 工作区 commit 本地仓库 push 远程服务器仓库
-
反向
本地文件 checkout 工作区 reset 本地仓库 pull 远程服务器仓库
当你发现merge错了的话,回退
git reset --hard commimt_RSA_id
git push --f