Github提交Spark代码

记录下提交过程,易忘供查询用。内容源自田总的分享。

1)在github上fork一份最新的master代码

2)用社区代码库创建本地仓库

git clone https://github.com/apache/spark test-spark

3)加入自己的github代码库

cd test-spark
git remote -v #列出已经存在的分支
origin https://github.com/apache/spark (fetch)
origin https://github.com/apache/spark (push) git remote add roger https://github.com/luogankun/spark #在url创建名字为roger的仓库
git remote -v
origin https://luogankun@github.com/luogankun/spark.git (fetch)
origin https://luogankun@github.com/luogankun/spark.git (push)
roger https://github.com/luogankun/spark (fetch)
roger https://github.com/luogankun/spark (push)

4)下载自己的github代码库

git fetch luogankun

报错:error: The requested URL returned error: 403 Forbidden while accessing https://github.com/luogankun/spark/info/refs
添加代理:git config --global http.proxy http://ip:port

5)创建新的分支并且切换到新分支上

git checkout -b spark-8888 origin/master

git branch #显示当前所在的分支,以及目前本地所有分支,前面有*标注的是当前所在分支
git branch -a #显示当前所在的分支,以及目前远程所有分支,前面有*标注的是当前所在分支

6)修改代码
...

7)本地提交

git status
git add .......
git commit –m "github spark test"

8)提交到远程

git push luogankun spark-8888

9)创建issue和PR

上一篇:LightOJ - 1364 Expected Cards(概率dp)


下一篇:[网络管理]windows server backup