VOIUE

「路漫漫其修远兮 吾将上下而求索」

本地仓库推送至github

1
2
3
4
5
6
7
8
$ git init
coding
$ git add.
$ git commit -m "balabala"
github上新建仓库(最好同名)复制链接
$ git remote add origin + 你的链接
$ git pull --rebase oring master
$ git push -u origin master

平时推送

1
2
3
$ git add .
$ git commit -m "balabala"
$ git push

github仓库克隆到本地coding再推送

1
2
3
4
5
$ git clone 仓库链接
coding
$ git add .
$ git commit -m "balabala"
$ git push

PR(pull request)

1
2
3
4
5
6
7
8
9
10
11
  github网页上fork源仓库
$ git clone 自己fork的项目
$ git remote add upstream 源仓库
$ git remote -v
$ git checkout -b 新的分支
change code
$ git status
$ git add .
$ git commit -m "说明"
$ git push origin 分支名
github网页上提交pr(New pull request)

原文链接:https://www.hojun.cn/2018/03/24/ck70npt44000ue0tusk97bg40/



 评论