Github提交Spark代碼 - 瞌睡中的葡萄虎 - 博客園
http://www.cnblogs.com/luogankun/p/3927336.html
記錄下提交過程币叹,易忘供查詢用。內(nèi)容源自田總的分享霍衫。
1)在github上fork一份最新的master代碼
2)用社區(qū)代碼庫創(chuàng)建本地倉庫
git clone https://github.com/apache/spark test-spark
3)加入自己的github代碼庫
cd test-sparkgit remote -v #列出已經(jīng)存在的分支origin https://github.com/apache/spark (fetch)origin https://github.com/apache/spark (push)git remote add roger https://github.com/luogankun/spark #在url創(chuàng)建名字為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
報(bào)錯: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)創(chuàng)建新的分支并且切換到新分支上
git checkout -b spark-8888 origin/master
git branch #顯示當(dāng)前所在的分支弛矛,以及目前本地所有分支,前面有標(biāo)注的是當(dāng)前所在分支git branch -a #顯示當(dāng)前所在的分支,以及目前遠(yuǎn)程所有分支,前面有標(biāo)注的是當(dāng)前所在分支
6)修改代碼...
7)本地提交
git statusgit add .......git commit –m "github spark test"
8)提交到遠(yuǎn)程
git push luogankun spark-8888
9)創(chuàng)建issue和PR