Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Git and GitHub Basic with SourceTree

Git and GitHub Basic with SourceTree

這是一份寫給 Git 新手的入門簡報。相信藉由 SourceTree 這套圖形化的版本控制工具,可降低不少入門時的門壏。
 
* Blog - http://note.drx.tw/2015/05/git-and-github-basic-with-sourcetree.html

Chu-Siang Lai

April 29, 2015
Tweet

More Decks by Chu-Siang Lai

Other Decks in Technology

Transcript

  1. [ chusiang@nsysucm ~ ] $ cat .profile # Author: 㲺Ռᗼ

    / chusiang.lai (at) gmail.com # Blog: http://note.drx.tw # Modified: 2015-04-29 17:50 GitHub & Bacis with SourceTree 1
  2. 橕ෝ㲺Ռᗼ • 5 ଙ犥Ӥጱ Git ֵአ妿涢牐 • 獮 Foxconn 敟誢ૡ纷䒍牐

    • 匍肬 DrSays IT ૡ纷䒍牐 • ፘ橕֢ߝ޾茐֢物 • LifeZMD • @be_vimmer_tw • ̽ਠ獊አ GNU/Linux ૡ֢̾ • 㲺Ռጱ執懿 2
  3. Outline I. Git ฎՋ讕? II. GitHub ݈ฎՋ讕? III. Git &

    GitHub ݢ犥ெ讕ሻ? IV. 10 ೗౮傶 Git य़䒍牐 V. GitHub 褰璤介涢牐 4
  4. Git ฎՋ讕? • SCM (Source Code Management, Software Configuration Management)

    • VCS (Version Control Software) • 獤碂ୗጱ粚๜矒ګ羬翄 • ᛔኧ敟誢 (GPL License) 7 ྭ襑 Server牧ݢ櫝娄ֵአ 犋ொᤩ薛䥁牏犋ொ౮傶敟誢疅㱾
  5. 9 䲆礯䄸 粚๜矒ګ 翕᪠臻蟠 粚๜矒ګ • FTP 粚๜矒ګ • 瓟婘䲆粚๜矒ګ

    • Google 襇ᒒᏝ繕粚๜矒ګ • Dropbox 粚๜矒ګ • ...
  6. ग़Ո㶧ݶ樄咳 • LifeZMD 傶 Charlie, Chu, Dick, Olga, Steven, chusiang

    ෝ iDSBG ᒫӣ䌵 HTML5 Hackathon ಅ蕣֢牐 • 穉搴౮婧物ᒫ 4 ݷ牐 • 穉搴碻樌物2 ॠ 1 ज़牐 • 㿁褧Ո碍物6 Ո牐 LifeZMD - http://goo.gl/OHJK9u 27
  7. 覌眲翕ᒊ SM ฎ㮆ֵአ GitHub Pages ๐率޾ ጱ HTML, CSS ޾

    Javascript ಅ䌃౮ ጱय़ਁ䁭 Web Apps牐 SM - http://sm.drx.tw 28
  8. 䌃䨗 • 萞ኧ GitHub ޾ GitBook ๐率ጱ碉 ݳ牧౯㮉ݢ犥ֵአ Markdown 承ဩ

    砰䌃෈ᒍ牧㪔碉ቘ౮㲘牐 • GitBook ݶ碻ඪൔ Web, PDF, ePub ޾ mobi 缛ग़圵໒ୗ牐 ਠ獊አ GNU/Linux ૡ֢ - http://goo.gl/OHJK9u 30
  9. 瞱媲碉ݳ (CI) 砇蟴䔶य़ጱ Jenkins CI牧ܨݢ蝱ᤈ
 ᛔ㵕玕介手 (Web UI, Unit test)牏


    翥捌 (AOSP)牏蝢Ꭳ懱௳ (Email, HipChat, Slack) ... 缛碉ݳ牐 Jenkins CI - https://ci.jenkins-ci.org/ 31
  10. ૢ棎 ૢ棎 41 # 蕦蕣 (clone) $ git clone [email protected]:chusiang/sandbox.git

    夺ਁ 蟂犩藶硬౮ᛔ૩ጱ癱蒈 夺ਁ蟂犩藶硬౮ᛔ૩ጱ癱蒈 夺ਁ蟂犩藶硬
  11. ݦ棎 # 碝ी (Add)牏㳫ᴻ (Remove) $ git { add |

    rm } README.md # ᑏ㵕 (Move) $ git mv README.md foo.md
  12. च๜砺֢ (Basic) 1. ጭ獈 Github牐
 - https://github.com/ 2. 䌘 Lab

    ጱ Repository 蝱ᤈ fork牐
 - https://github.com/chusiang/sandbox/ 3. ӥ斉纷ୗ嘨牐
 $ git clone https://github.com/YourName/sandbox.git 4. 碝ी䲆礯㪔൉Ի牐
 $ git { add | status | commit } 5. Ӥ㯽纷ୗ嘨牐
 $ git push 80 Login GitHub fork Repository git clone git add git commit git status git push Finish? Yes No
  13. 蝱褩砺֢ (Advanced) 1. ෝٌਙ᪠䕩ٚ稞ӥ斉纷ୗ嘨牐
 $ git clone https://github.com/YourName/sandbox.git 2. 碝ी牏狕硬牏㳫ᴻ䲆礯㪔൉Իग़稞牐


    $ git { add | mv | rm | status | commit } 3. 碝ी獤ඪ㪔൉Իग़稞牐 4. 獥矦ᛗݱ㮆夵袅讨޾獤ඪ牐
 $ git checkout OXOXOXX 5. ݳ㬫獤ඪ牐 6. Ӥ㯽纷ୗ嘨牐
 $ git push origin master 81 dev master Finish
  14. 85

  15. Reference • 匍䁰و執෈կ - http://goo.gl/aqTTYO • 匍䁰ፗ砮翕࣎ - https://youtu.be/5ftNjrpzVqM •

    蝫糞ৼ᮷胼睞ጱ Git 獈槹瞲ܖ | 揔໒禼 (Backlog) - http://backlogtool.com/git-guide/tw/ • 䌃妔य़疑ጱ Git 硽䋊 | slideshare - http://www.slideshare.net/littlebtc/git-5528339 • Git 䋿率瑽薹 | slideshare - http://www.slideshare.net/pokaichang72/git-42427674 • Git ਥො෈կ - http://git-scm.com/book/zh-tw/v1 • 瑽粙㬵რ物 • 㾴疑瑿ቘ褾扮 - http://www.ngtaiwan.com • 10 Years of Git | Atlassian Git Tutorial - https://www.atlassian.com/git/articles/10-years-of-git/ 88