原文
注
創建github帳號
http://github
Fork 你的jboss as 副本
http://github
用Git克隆你的副本到本機工作區
$ git clone git@github
Initialized empty Git repository in /devel/jboss
remote: Counting objects:
remote: Compressing objects:
remote: Total
Receiving objects:
Resolving deltas:
$ cd jboss
將git遠程引用添加為upstream 為了以後使用pull來更新
git remote add upstream git://github
使用maven (通過命令 build sh) (確實你在使用 maven )
$
[INFO]
[INFO] Reactor Summary:
[INFO]
[INFO] JBoss Application Server: BOM
[INFO] JBoss Application Server: Parent Aggregator
[INFO] JBoss Application Server: Domain Core
[INFO] JBoss Application Server: Server Manager
[INFO] JBoss Application Server: Server
[INFO] JBoss Application Server: Domain Controller
[INFO] JBoss Application Server: Process Manager
[INFO] JBoss Application Server: Remoting
[INFO] JBoss Application Server: Build
[INFO]
[INFO] BUILD SUCCESS
[INFO]
從 upstream 拉取(pull)更新
寫道
$ git pull
From git://github
* branch master
Updating
Fast
{parent => bom}/pom
build/pom
domain/pom
domain/src/main/resources/schema/jboss
pom
process
rename {parent => bom}/pom
(如果你有本地提交
有一個辦法讓你不會忘記
$ git config
然後使用新的別名
$ git up upstream master
另一個更加推崇的辦法
$ git config
推送(push) 你拉取(pull)的更新到你個人的github repo
Java代碼
$ git push
Counting objects:
done Delta compression using up to
threads Compressing objects:
% ( / ) done Writing objects:
% ( / ) KiB done Total
(delta ) reused (delta ) To git@github
com:[your user]/jboss as git fa df master > master
你可能加上
討論你計劃的修改 (如果你想要得到反饋)
論壇
http://community jboss org/en/jbossas/dev/jboss_as _development IRC即時消息
irc://irc freenode org/jboss as or https://webchat freenode net/?channels=jboss as
為你的修改(增強/修復bug)發布一個JIRA
http://jira
創建一個簡單的主題分支(branch)來隔離這項工作 (僅作為一個推薦方法)
Java代碼
git checkout
b my_cool_feature
Note: See tips section for how to use a nice git prompt for tracking what branch you are in!
不斷的修改並且提交你的修改 (不要忘了push)
Java代碼
git commit
m ;JBAS XXXX Frunubucate the Fromungulator ; git commit
m ;JBAS YYYY Tripple Performance of Fromungulation ; git push my_cool_feature
注意 git push 默認引用你正在push的branch
給予master分支的最新更新重建/衍合(rebase)你的分支(將你的提交更新到master的頂端)
git fetch upstream
git rebase
# if you have conflicts fix them and rerun rebase
# The
git push
選 項
將你的修改merge到upstream
在你請求將你的更新合並到upstream之前
請重復步驟 確認你的repo和upstream是同步的 發送一個pull request email to jbossas
pull requests@lists jboss org (要加入這個list 參考 here ) 附上你的repo的鏈接 描述你的修改 誰檢查你的改動(如果有的話) 在檢查之後
管理員會合並你的patch update/resolve你請求中問題 並回復什麼時候完成 不會忘了切換會master分支
並且拉取更新
git checkout master
git pull upstream master
From:http://tw.wingwit.com/Article/program/Java/ky/201311/28948.html