Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
任務導向的 Git/GitHub 介紹
Search
[email protected]
October 23, 2019
Programming
400
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
任務導向的 Git/GitHub 介紹
[email protected]
October 23, 2019
Transcript
29 slides
Git/GitHub 介紹 任務導向的
我們基本上在終端機下指令, 對 Windows 使用者來說, 在安排好 Git 之後, 就自動會有個叫 Git Bash
的 終端機應用程式! https://git-scm.com/downloads
任務 1 GitHub 當我雲端展示空間
我寫了好棒的程式, 大家 不知道真是太可惜了!
我的電腦裡有個資料夾, 裡面 有很多我的程式。想要放到 GitHub, 之後還會不斷更新。 MyWork
https://github.com/ 申請免費帳號。 GitHub
MyWork MyWork GitHub 上一個 Repo 本機端 同步
1 建一個新的 Repo 在 GitHub 建一個新的 Repo, 名稱用英文, 不一定 要和原來本機端資料夾名
稱相同。
2 Git 初始設定 其實可愛的 GitHub 會教你, 在本機資料夾下做。 > git init
檔案 要 Git 管 Git 正式接手 add commit Git 接管三部曲
3 執行三部曲 > git add . > git commit -m
“這次更更新的重點” 基本上我們每次有更新都做一樣的動作就好。
4 第一次送到 GitHub > git remote add origin https//….git >
git push -u origin master 基本上就是告訴本機端的 Git, 相對雲端的 Repo 位罝在哪裡, 這只有第一次!
5 以後在 commit 後的更新 以後都是這樣... > git push
6 Git 端有別人更新 有共同維護者, 或是你在不同電腦上都做... > git pull
MyWork MyWork GitHub 上一個 Repo 本機端 push pull 這是 fetch
+ merge 建好了以後更新很容易, 就是不斷的 pull 和 push...
任務 2 讓人家看我 GitHub 上的 Jupyter Notebook 檔
https://nbviewer.jupyter.org/ 打入我的 GitHub ID…
專屬 GitHub 上 Jupyter Notebook 展示區!
任務 3 我只是想維持別人 GitHub Repo 最新版
1 Clone 一個 GitHub Repo 網址在 GitHub 的 Repo 上
Clone 的地方可 以找到。 > git clone https://.. 我就愛改名
2 就 pull 更新! > git pull
3 我不過要 copy 一個檔案... 使用 curl 抓單一檔案, 記得要找到 raw 版
的網址! > curl https://raw... -o 我就愛改名
任務 4 更炫的是 fork 一個專案
Fork 我的 GitHub 上也 會有個屬於我的 Repo!!
在 GitHub 上看到喜歡的專 案, fork 後你也有一份! pull - push 自己電腦也有一份的話,
就可以用 來管理!
那... 原來的 repo 更新的話呢? 尤其是像我們上課每週更新...
origin 如果你是用前面介紹開 GitHub Reop 的方 法, 你本機應該設好了 指向自己 fork 的
repo upstream 現在我們要再設個: 指向原始的 repo
> remote add upstream https://原始的repo.git 在終端機中, 進入本機的資料夾下...
> git pull upstream 然後就可以定期 pull, 只是從 upstream 來
More Decks by
[email protected]
See All by
[email protected]
【深度學習】08 強化學習
yenlung
0
530
Contrastive Self-Supervised Learning
yenlung
0
590
【深度學習】07 生成模式和 GAN
yenlung
0
550
【深度學習】06 RNN 實務與 Transformers
yenlung
0
480
【深度學習】05 有記憶的神經網路 RNN
yenlung
0
390
【深度學習】04 圖形辨識的天王 CNN
yenlung
0
450
【深度學習】03 神經網路是怎麼學的
yenlung
0
370
【深度學習】02 AI 就是問個好問題
yenlung
0
400
咖啡沖煮簡介
yenlung
0
1.5k
Other Decks in Programming
See All in Programming
あなたの await、OS まで届いてる? strace で覗く JavaScript の非同期
hasutosasaki
1
2.4k
SODA - FACT BOOK(EN)
sodainc
1
260
Beyond Chatbots: Agentic UI with Open Standards @W-JAX 2026, München
manfredsteyer
PRO
0
120
私なりのハーネスエンジニアリング ~独自の言語処理系の開発を通して~
seosoft
0
220
Kotlin JVM用に作られたライブラリのKMPを前提とした再設計
jsoizo
0
200
Zero-Tap Sign-In対応、結局何をすればいいの?
mitohato14
0
2.4k
Snowflake Openflow Connector利用の勘所 / 20261024developersio2026tokyo-snowflake-openflow
kasacchiful
PRO
0
360
Proxmox x Talos Linux x Terraform で実現するなんかいい感じの Kubernetes クラスタ / A Sleek Kubernetes Cluster Powered by Proxmox, Talos Linux, and Terraform
nnaka2992
0
260
조합이폭발하는디자인시스템이걸눈으로도테스트하라고요
giljongyu
0
780
Engineering Biometric UX Across Android Versions | DroidKnights 2026
ryunen344
1
210
[DroidKnights 2026] Workflow AX 적용기 — 자동 정책 정리부터 E2E까지
dayeon
0
110
React Native経験者が Flutterを30⽇間触って驚いたこと
3saito
0
200
Featured
See All Featured
Darren the Foodie - Storyboard
khoart
PRO
5
4.1k
What does AI have to do with Human Rights?
axbom
PRO
1
2.5k
Abbi's Birthday
coloredviolet
5
11k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.6k
[SF Ruby Conf 2025] Rails X
palkan
3
1.5k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
530
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
2
530
How to Talk to Developers About Accessibility
jct
2
620
Optimising Largest Contentful Paint
csswizardry
37
4k
Odyssey Design
rkendrick25
PRO
3
960
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.9k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.7k