Git常用命令与GitHub使用技巧技巧整理

Tue Oct 10, 2017

100 Words|Read in about 1 Min
Tags: github   git  

1. GitHub中同步远程分支

查看本地已有分支

git remote -v

增加远程分支

git remote add upstream https://github.com/k8smeetup/kubernetes.github.io.git
git fetch upstream
git checkout master
git merge upstream/master

2. 更新Git代码并对比

git remote -v
git fetch origin master
git log -p master.. origin/master
git merge origin/master

3. 删除远程分支

git push origin --delete <branchName>
git push origin --delete tag <tagName>

「真诚赞赏,手留余香」

Jimmy Song

真诚赞赏,手留余香

使用微信扫描二维码完成支付

See Also

Tue Oct 10, 2017

100 Words|Read in about 1 Min
Tags: github   git