[請益] GitHub如何正確的修改他人repo

看板Soft_Job作者 (馬岱)時間10年前 (2014/05/16 16:19), 編輯推噓4(402)
留言6則, 6人參與, 最新討論串1/2 (看更多)
不好意思,不知道github的東西能不能在這裡問? 不能的話我會自刪,謝謝! == 最近在github上面看別人的code的時候,發現了一些地方可以修改 我按照github官方的說法,先從(假設是B)Fork了一份在自己這邊(假設是A) $ git clone https://github.com/ A /repo.git $ cd repo $ git remote add upstream https://github.com/ B /repo.git $ git fetch upstream $ git merge upstream/master 似乎流程應該是這樣,然後開一個修改branch, commit push完之後,就可以做pull request。 問題在,修改的地方在repo的某一個branch中, 我按照上面的跑下來,在我的本機上只有repo/master這條分支 請問要怎麼樣修改branch呢? 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.121.146.35 ※ 文章網址: http://www.ptt.cc/bbs/Soft_Job/M.1400228354.A.A2A.html

05/16 16:25, , 1F
git branch 只有master嗎@@
05/16 16:25, 1F

05/16 16:35, , 2F
是,git branch 只有 master @@
05/16 16:35, 2F

05/16 16:41, , 3F
checkout branch過去改阿
05/16 16:41, 3F

05/17 01:55, , 4F
clone 後,git checkout -b branchName,開始改issue
05/17 01:55, 4F

05/17 10:36, , 5F
git branch -r 可以看到 remote branch
05/17 10:36, 5F

05/17 14:58, , 6F
善用 github 的 GUI
05/17 14:58, 6F
文章代碼(AID): #1JTSe2eg (Soft_Job)
文章代碼(AID): #1JTSe2eg (Soft_Job)