Suche senden
Hochladen
Git in a nutshell
•
42 gefällt mir
•
9,985 views
Nelson Tai
Folgen
粗略介紹 Git 的用法,以及一些在 Windows 跟 Mac 底下的工具
Weniger lesen
Mehr lesen
Technologie
Melden
Teilen
Melden
Teilen
1 von 80
Jetzt herunterladen
Downloaden Sie, um offline zu lesen
Empfohlen
Yet another introduction to Git - from the bottom up
Yet another introduction to Git - from the bottom up
Wen-Tien Chang
Git Tutorial 教學
Git Tutorial 教學
Wen-Tien Chang
Git基礎介紹
Git基礎介紹
Max Ma
Git tutorial for windows user (給 Windows user 的 Git 教學)
Git tutorial for windows user (給 Windows user 的 Git 教學)
Cloud Tu
版本控制 使用Git & git hub
版本控制 使用Git & git hub
維佋 唐
Introduction to git
Introduction to git
Bo-Yi Wu
工程師必備第一工具 - Git
工程師必備第一工具 - Git
Alan Tsai
Git and Github basic with SourceTree
Git and Github basic with SourceTree
Chu-Siang Lai
Empfohlen
Yet another introduction to Git - from the bottom up
Yet another introduction to Git - from the bottom up
Wen-Tien Chang
Git Tutorial 教學
Git Tutorial 教學
Wen-Tien Chang
Git基礎介紹
Git基礎介紹
Max Ma
Git tutorial for windows user (給 Windows user 的 Git 教學)
Git tutorial for windows user (給 Windows user 的 Git 教學)
Cloud Tu
版本控制 使用Git & git hub
版本控制 使用Git & git hub
維佋 唐
Introduction to git
Introduction to git
Bo-Yi Wu
工程師必備第一工具 - Git
工程師必備第一工具 - Git
Alan Tsai
Git and Github basic with SourceTree
Git and Github basic with SourceTree
Chu-Siang Lai
幸福快樂的完美結局
幸福快樂的完美結局
Anna Su
Git and git hub
Git and git hub
唯 李
Mercurial簡介與教學
Mercurial簡介與教學
芳本 林
Git 版本控制 (使用教學)
Git 版本控制 (使用教學)
Jui An Huang (黃瑞安)
連哈秋都懂的Git教學
連哈秋都懂的Git教學
hydai
Git 入門與實作
Git 入門與實作
奕浦 郭
Git由超淺入超深
Git由超淺入超深
羊 小咩 (lamb-mei)
初心者 Git 上手攻略
初心者 Git 上手攻略
Lucien Lee
Git 版本控制系統 -- 從微觀到宏觀
Git 版本控制系統 -- 從微觀到宏觀
Wen-Tien Chang
寫給大家的 Git 教學
寫給大家的 Git 教學
littlebtc
Visual Studio 2015 與 Git 開發實戰
Visual Studio 2015 與 Git 開發實戰
Will Huang
A successful git branching model 導讀
A successful git branching model 導讀
Wen Liao
Git & Sourcetree 介紹
Git & Sourcetree 介紹
Adison wu
Git 經驗分享
Git 經驗分享
Mu Chun Wang
Git flow 與團隊合作
Git flow 與團隊合作
Bo-Yi Wu
Gitlab
Gitlab
Tom Chen
Git與source tree 基礎教學
Git與source tree 基礎教學
Duncan Chen
git merge 與 rebase 的觀念與實務應用
git merge 與 rebase 的觀念與實務應用
Will Huang
Git 入门实战
Git 入门实战
icy leaf
Git 程式碼版本控制軟體介紹
Git 程式碼版本控制軟體介紹
PingLun Liao
Getting Git Right
Getting Git Right
Sven Peters
Introduction to git
Introduction to git
Randal Schwartz
Weitere ähnliche Inhalte
Was ist angesagt?
幸福快樂的完美結局
幸福快樂的完美結局
Anna Su
Git and git hub
Git and git hub
唯 李
Mercurial簡介與教學
Mercurial簡介與教學
芳本 林
Git 版本控制 (使用教學)
Git 版本控制 (使用教學)
Jui An Huang (黃瑞安)
連哈秋都懂的Git教學
連哈秋都懂的Git教學
hydai
Git 入門與實作
Git 入門與實作
奕浦 郭
Git由超淺入超深
Git由超淺入超深
羊 小咩 (lamb-mei)
初心者 Git 上手攻略
初心者 Git 上手攻略
Lucien Lee
Git 版本控制系統 -- 從微觀到宏觀
Git 版本控制系統 -- 從微觀到宏觀
Wen-Tien Chang
寫給大家的 Git 教學
寫給大家的 Git 教學
littlebtc
Visual Studio 2015 與 Git 開發實戰
Visual Studio 2015 與 Git 開發實戰
Will Huang
A successful git branching model 導讀
A successful git branching model 導讀
Wen Liao
Git & Sourcetree 介紹
Git & Sourcetree 介紹
Adison wu
Git 經驗分享
Git 經驗分享
Mu Chun Wang
Git flow 與團隊合作
Git flow 與團隊合作
Bo-Yi Wu
Gitlab
Gitlab
Tom Chen
Git與source tree 基礎教學
Git與source tree 基礎教學
Duncan Chen
git merge 與 rebase 的觀念與實務應用
git merge 與 rebase 的觀念與實務應用
Will Huang
Git 入门实战
Git 入门实战
icy leaf
Git 程式碼版本控制軟體介紹
Git 程式碼版本控制軟體介紹
PingLun Liao
Was ist angesagt?
(20)
幸福快樂的完美結局
幸福快樂的完美結局
Git and git hub
Git and git hub
Mercurial簡介與教學
Mercurial簡介與教學
Git 版本控制 (使用教學)
Git 版本控制 (使用教學)
連哈秋都懂的Git教學
連哈秋都懂的Git教學
Git 入門與實作
Git 入門與實作
Git由超淺入超深
Git由超淺入超深
初心者 Git 上手攻略
初心者 Git 上手攻略
Git 版本控制系統 -- 從微觀到宏觀
Git 版本控制系統 -- 從微觀到宏觀
寫給大家的 Git 教學
寫給大家的 Git 教學
Visual Studio 2015 與 Git 開發實戰
Visual Studio 2015 與 Git 開發實戰
A successful git branching model 導讀
A successful git branching model 導讀
Git & Sourcetree 介紹
Git & Sourcetree 介紹
Git 經驗分享
Git 經驗分享
Git flow 與團隊合作
Git flow 與團隊合作
Gitlab
Gitlab
Git與source tree 基礎教學
Git與source tree 基礎教學
git merge 與 rebase 的觀念與實務應用
git merge 與 rebase 的觀念與實務應用
Git 入门实战
Git 入门实战
Git 程式碼版本控制軟體介紹
Git 程式碼版本控制軟體介紹
Andere mochten auch
Getting Git Right
Getting Git Right
Sven Peters
Introduction to git
Introduction to git
Randal Schwartz
Getting Git
Getting Git
Scott Chacon
Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners
HubSpot
Git in a nutshell
Git in a nutshell
Pranesh Vittal
Git 101 Presentation
Git 101 Presentation
Scott Chacon
Git and Github
Git and Github
Wen-Tien Chang
Git and GitHub
Git and GitHub
James Gray
Advanced Git
Advanced Git
segv
Git 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using Git
Geoff Hoffman
Introduction to Git/Github - A beginner's guide
Introduction to Git/Github - A beginner's guide
Rohit Arora
Quick Introduction to git
Quick Introduction to git
Joel Krebs
Introduction to git
Introduction to git
Shilu Shrestha
GitSlides
GitSlides
Federico Spinelli
Sys05 uso consapevole di git - beyond the basic
Sys05 uso consapevole di git - beyond the basic
DotNetCampus
Introduzione a GIT - Laboratorio di Web Design 2014/15
Introduzione a GIT - Laboratorio di Web Design 2014/15
Giovanni Buffa
GITT (part 1 of 2)
GITT (part 1 of 2)
Ali Servet Donmez
Git–SVN
Git–SVN
Ali Servet Donmez
Perchè Git?
Perchè Git?
Mauro Ferratello
Linux Day 2015 Genova
Linux Day 2015 Genova
mperrando
Andere mochten auch
(20)
Getting Git Right
Getting Git Right
Introduction to git
Introduction to git
Getting Git
Getting Git
Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners
Git in a nutshell
Git in a nutshell
Git 101 Presentation
Git 101 Presentation
Git and Github
Git and Github
Git and GitHub
Git and GitHub
Advanced Git
Advanced Git
Git 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using Git
Introduction to Git/Github - A beginner's guide
Introduction to Git/Github - A beginner's guide
Quick Introduction to git
Quick Introduction to git
Introduction to git
Introduction to git
GitSlides
GitSlides
Sys05 uso consapevole di git - beyond the basic
Sys05 uso consapevole di git - beyond the basic
Introduzione a GIT - Laboratorio di Web Design 2014/15
Introduzione a GIT - Laboratorio di Web Design 2014/15
GITT (part 1 of 2)
GITT (part 1 of 2)
Git–SVN
Git–SVN
Perchè Git?
Perchè Git?
Linux Day 2015 Genova
Linux Day 2015 Genova
Ähnlich wie Git in a nutshell
Git Tutorial
Git Tutorial
Drake Huang
Git Essence Tutorial
Git Essence Tutorial
Ho Kim
First meetingwithgit
First meetingwithgit
Rhythm Sun
Git使用入门
Git使用入门
dpf2e
Git 超簡單學習懶人包(軟體程式版本控管系統)
Git 超簡單學習懶人包(軟體程式版本控管系統)
flylon
Git 教學
Git 教學
Ming-Sian Lin
Git+使用教程
Git+使用教程
gemron
Git & git hub v1.2
Git & git hub v1.2
Chris Chen
Git flow
Git flow
shaokun
Git 簡介(古時候的簡報備份)
Git 簡介(古時候的簡報備份)
Hsin-lin Cheng
Git 使用介绍
Git 使用介绍
medcl
Git share
Git share
mactanxin
Git内部培训文档
Git内部培训文档
superwen
Git & git flow
Git & git flow
Amo Wu
Git原理与实战 201607
Git原理与实战 201607
Charles Tang
Build Your Own Android Toolchain from scratch
Build Your Own Android Toolchain from scratch
National Cheng Kung University
Learning to Use Git | WeiYuan
Learning to Use Git | WeiYuan
Wei-Yuan Chang
Git基础培训
Git基础培训
诸葛修车网-诸葛商城
20150313 ian git
20150313 ian git
LearningTech
20170510 git 懶人包
20170510 git 懶人包
Chen-Ming Yang
Ähnlich wie Git in a nutshell
(20)
Git Tutorial
Git Tutorial
Git Essence Tutorial
Git Essence Tutorial
First meetingwithgit
First meetingwithgit
Git使用入门
Git使用入门
Git 超簡單學習懶人包(軟體程式版本控管系統)
Git 超簡單學習懶人包(軟體程式版本控管系統)
Git 教學
Git 教學
Git+使用教程
Git+使用教程
Git & git hub v1.2
Git & git hub v1.2
Git flow
Git flow
Git 簡介(古時候的簡報備份)
Git 簡介(古時候的簡報備份)
Git 使用介绍
Git 使用介绍
Git share
Git share
Git内部培训文档
Git内部培训文档
Git & git flow
Git & git flow
Git原理与实战 201607
Git原理与实战 201607
Build Your Own Android Toolchain from scratch
Build Your Own Android Toolchain from scratch
Learning to Use Git | WeiYuan
Learning to Use Git | WeiYuan
Git基础培训
Git基础培训
20150313 ian git
20150313 ian git
20170510 git 懶人包
20170510 git 懶人包
Git in a nutshell
1.
2.
Git 是什麼?
What is Git?
3.
Git 是什麼 git [git] n. 飯桶﹐無用的人
4.
版本控制系統 ™ 多人協同開發 ™
每個人開發一個小功能 ™ 改錯了還有救 ™ 可回溯到之前版本 ™ 可知道是誰改爛的
5.
源起 ™ Linus Torvalds
(Linux 的作者) ™ 為了管理 Linux Kernel 程式碼而開發
6.
採用 Git 的專案 ™
Android ™ jQuery ™ Linux Kernel ™ Perl ™ Debian, Fedora, openSUSE ™ Qt ™ Git ™ Ruby on Rails ™ Gnome ™ VLC ™ GIMP ™ Wine ™ GTK+ ™ X.org Server ™ x264
7.
Git 的好處
Why Git is better than X http://zh-tw.whygitisbetterthanx.com/
8.
優於其他管理系統
9.
本機管理系統
10.
本機管理系統
11.
中央管理系統 (CVCS)
12.
中央管理系統 (CVCS)
13.
分散管理系統 (DVCS)
14.
分散管理系統 (DVCS)
15.
沒有網路也能工作 ™ Git once,
coding anywhere! ™ Branch 開不用錢 ™ 看 log 超快
16.
適合超大量資料 ™ 操作速度超快 ™ 儲存的檔案很小 ™
連 Linux Kernel 都 hold 得住
17.
Branch 不用錢 ™ 開
branch 幾乎零成本 ™ 開 branch 改東西,不怕改爛主軸 ™ 切換 branch 很簡單 ™ Git 的 merge 很聰明
18.
Git 的運作概觀
Git overview
19.
關於版本 The Others’ Way
20.
關於版本 The Git’s Way
21.
22.
23.
Git 是這樣看待 commit
的
24.
Git 是這樣看待 commit
的
25.
一些用語 ™ HEAD
™ 指出目前位於哪個節點 ™ origin ™ 預設的原始 repo 名稱 ™ master ™ 預設的 branch 名稱 ™ bare repo ™ 分享的 repo,習慣以 ProjName.git 命名
26.
支援協定 ™ file://
™ 本機檔案,例如用 Dropbox 架 repo ™ ssh:// ™ 安全,適合寫入 ™ git:// ™ 效率好,但沒有認證機制,適合唯讀 ™ http:// or https:// ™ 簡單,效率低,可突破防火牆
27.
忽略規則 ™ 空目錄會被忽略
™ 習慣放個 .gitkeep 在裡頭避免忽略 ™ 用 .gitignore 排除不需要的檔案 ™ https://github.com/github/gitignore ™ 放在 Working tree 的根目錄 ™ 記得也要 commit ™ 能自動產生的東西都該排除 ™ 全域設定放在 ~/.gitignore
28.
Git 常用指令
Git commands
29.
git config ™ 使用者資訊,commit
時會用到 ™ git config --global user.name “Your Name” ™ git config --global user.email “account@mail.address”
30.
git config ™ 讓終端機顯示上色
™ git config --global color.ui true
31.
git config ™ For
Linux & Mac ™ git config --global core.autocrlf input ™ git config --global core.safecrlf true ™ For Windows ™ git config --global core.autocrlf true ™ git config --global core.safecrlf true
32.
git init ™ 初始化
repo ™ 建立 bare repo ™ git init --bare
33.
git add ™ 將新檔案加入追蹤 ™
將修改過的檔案加入 stage ™ git add . ™ 將所有檔案加入追蹤 ™ 常接在 git init 之後
34.
git commit ™ 提交
stage 裡的資料 ™ git commit -m “Commit message”
35.
git clone ™ 複製一份
repo ™ 從 bare repo 複製 ™ git clone protocol://path/to/bare_repo.git ™ 從現有 repo 建立 bare repo ™ git clone --bare <dir_name> <bare_dir_name>.git
36.
git status ™ 檢視目前狀態
37.
git branch ™ 列出或建立
branch ™ git branch <branch_name> ™ branch name 強烈建議用 [0-9A-Za-z_-.]
38.
git tag ™ 列出或建立
tag ™ tag name 強烈建議用 [0-9A-Za-z_-.]
39.
git tag (cont.) ™
建立 tag ™ git tag <tag_name> ™ git push --tags ™ 移除 tag ™ git tag -d <tag_name> ™ git push origin :refs/tags/<tag_name>
40.
git checkout ™ 切換到其他
branch ™ git checkout -b <branch_name> = git branch <branch_name> + git checkout <branch_name>
41.
git stash ™ 保存目前的工作環境 ™
git stash apply --index <stash_name> ™ 將保存的環境倒回來,包含 stage 的內容
42.
git reset ™ 重置
stage 的狀態 ™ git reset HEAD <file_name> ™ 重置單一檔案 ™ git reset HEAD ™ 重置所有檔案 ™ git reset --hard HEAD ™ 連 working tree 也重置
43.
git revert ™ 取消上個
commit ™ git revert HEAD ™ 會建立一個新 commit
44.
git fetch ™ 將本機
repo 與遠端 repo 同步
45.
git pull ™ 將本機
repo 與遠端 repo 同步,並更新 working tree ™ git pull = git fetch + git merge
46.
git push ™ 推送本機
repo 資料到遠端 repo
47.
git merge ™ 合併資料到當前
branch
48.
Git 工作流程
Work with Git
49.
工作流程 ref. http://progit.org/book/ch5-1.html
50.
Centralized Workflow
中央控管 適合小型團隊
51.
Integration-Manager Workflow
整合式管理員 適合網路多人協同專案,例如 GitHub.com
52.
Dictator and Lieutenants
Workflow 司令官與副手 適合超大專案,例如 Linux Kernel
53.
分支模型 ref. http://nvie.com/posts/a-successful-git-branching-model/
54.
55.
master ™ 一直存在的分支 ™ 記錄每個上線的版本 ™
只有在推出新版時才會變動 ™ 所謂的穩定版(stable version)
56.
develop ™ 一直存在的分支 ™ 必須總是
build 得過 ™ new feature 跟 enhancement 都在這裡 ™ 所謂的測試版(beta version)
57.
feature ™ 從 develop
分支出來 ™ 要 merge 回 develop ™ 新增或修改功能時才會出現 ™ 功能完成就砍掉
58.
release ™ 從 develop
分支出來 ™ 要 merge 回 master,並且上 tag ™ 要 merge 回 develop ™ 管理者決定要 release 新版時才會建立 ™ release 之後就砍掉 ™ 修改版本號、Release Note、ReadMe ™ 最後測試並修正測試發現的 bug
59.
hotfix ™ 從 master
分支出來 ™ 要 merge 回 master,並且上 tag ™ 要 merge 回 develop 或 release ™ 緊急修正問題專用 ™ 修正之後就砍掉 ™ 修改版本號、Release Note、ReadMe
60.
總結 ™ 不同 branch
有不同用途,不得混用 ™ 任何更動都要開 branch ™ 除了 master 跟 develop 之外,完成任務就砍掉 branch
61.
建議工作規範 My
proposal
62.
時常同步 ™ 每天或每週一次 ™ 有備份才安心 ™
習慣 Git 的操作 ™ 降低 merge 困難度
63.
愛用 branch ™ 開
branch 不用錢,所以任何變動都開 branch ™ 不要在 master 或 develop 修改程式
64.
詳細 commit ™ 記得移除行尾空白 ™
一次只 commit 一個主題 ™ commit message 寫清楚 ™ 第一行:主旨,少於 50 字元 ™ 第二行:空白 ™ 第三行:詳情,每行少於 74 字元
65.
關於檔案 ™ 避免不同平台產生亂碼 ™
檔名只能用 ASCII 字元 ™ 檔名不得使用可能非法字元,如 / ? < > * : | ” ™ 文字檔編碼一律用 UTF-8 ™ 避免不同軟體產生亂碼 ™ 文字檔內容一律用 ASCII 字元(即:不得用中文)
66.
Git 工具 Git on
Windows & Mac
67.
安裝 Git ™ Mac
™ http://code.google.com/p/git-osx-installer/ ™ Windows ™ http://code.google.com/p/msysgit/
68.
跨平台工具
69.
工程師的浪漫
70.
Mac
71.
SourceTree (Git/Hg) http://itunes.apple.com/us/app/sourcetree-git-hg/id411678673?mt=12
72.
GitX (L) http://gitx.laullon.com/
73.
Windows
74.
TortoiseGit http://code.google.com/p/tortoisegit/
75.
SmartGit http://www.syntevo.com/smartgit/index.html Cross-platform, free
for non-commercial purpose.
76.
EGit for Eclipse
http://eclipse.org/egit/
77.
Git 參考資料
Git references
78.
™ 簡介
™ http://git-scm.com/ ™ http://speakerdeck.com/u/dannvix/p/20111214-git-in- a-nutshell ™ http://www.slideshare.net/littlebtc/git-5528339 ™ 教學 ™ http://progit.org/ ™ http://marklodato.github.com/visual-git-guide/index- en.html ™ http://ihower.tw/blog/archives/category/git
79.
™ 其他
™ http://nvie.com/posts/a-successful-git-branching- model/ ™ https://github.com/github/gitignore ™ http://zh-tw.whygitisbetterthanx.com/ ™ http://people.debian.org.tw/~chihchun/2008/12/19/ linus-torvalds-on-git/
80.
你問,我…盡量答
Q&A
Jetzt herunterladen