记录下提交过程,易忘供查询用。内容源自田总的分享。
1)在github上fork一份最新的master代码
2)用社区代码库创建本地仓库
git clone https://github.com/apache/spark test-spark
3)加入自己的github代码库
cd test-sparkgit 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 -vorigin 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:port5)创建新的分支并且切换到新分支上
git checkout -b spark-8888 origin/master
git branch #显示当前所在的分支,以及目前本地所有分支,前面有*标注的是当前所在分支
git branch -a #显示当前所在的分支,以及目前远程所有分支,前面有*标注的是当前所在分支6)修改代码
...7)本地提交
git statusgit add .......git commit –m "github spark test"
8)提交到远程
git push luogankun spark-8888
9)创建issue和PR