SlideShare a Scribd company logo
1 of 16
Download to read offline
Git
⼤大綱
建置
基礎
還原
遠端
協同開發
代碼審查
⾃自動化測試
持續整合
公司瓶頸
PHP Environment
建置
GitLab



CRLF or LF?
統⼀一程式碼撰寫⽅方式
Editorconfig
基礎
add
Status
.gitignore
Commit 

-m {{提交訊息}}

-a {{版本}}
還原
Log
Checkout
Revert
Reset
Ref: https://gitbook.tw/chapters/rewrite-
history/reset-revert-and-rebase.html
Tips
Directory處理理⽅方式
.gitignore
.gitkeep
遠端
Remote
Clone
Push
Pull
協同開發
Branch
Merge
Strategy
Rebase
代碼審查
// TODO
// REVIEW
// ??????
⾃自動化單元測試
測試伺服器是否部署成功
git bisect start HEAD v1.0

git bisect run test-error.sh
https://git-scm.com/book/zh-tw/v1/Git-
%E5%B7%A5%E5%85%B7-
%E4%BD%BF%E7%94%A8-Git-%E5%81%9A-
Debug
Continuous Integration

持續整合
公司瓶頸
沒有建置個⼈人開發環境
使⽤用vim及WinSCP
部署流程???
GitLab無法部署到客⼾戶端
…
PHP Environment
舊版

tar -zcvf RAMS2011.tar.gz 

--exclude=RAMS2011/logs 

--exclude=RAMS2011/zUploadFiles 

--exclude=RAMS2011/sessions 

--exclude=RAMS2013/zCheckDuplication 

RAMS2011
新版

http://203.70.68.189/waynewu/rams-aleph/tree/master

More Related Content

What's hot

Introduction to git
Introduction to gitIntroduction to git
Introduction to gitBo-Yi Wu
 
淡江Git與GitHub操作介紹
淡江Git與GitHub操作介紹淡江Git與GitHub操作介紹
淡江Git與GitHub操作介紹Taien Wang
 
A successful git branching model 導讀
A successful git branching model 導讀A successful git branching model 導讀
A successful git branching model 導讀Wen Liao
 
Git内部培训文档
Git内部培训文档Git内部培训文档
Git内部培训文档superwen
 
寫給大家的 Git 教學
寫給大家的 Git 教學寫給大家的 Git 教學
寫給大家的 Git 教學littlebtc
 
Xcode 的 git 版本管理
Xcode 的 git 版本管理Xcode 的 git 版本管理
Xcode 的 git 版本管理彼得潘 Pan
 
Git基礎介紹
Git基礎介紹Git基礎介紹
Git基礎介紹Max Ma
 
Git原理与实战 201607
Git原理与实战 201607Git原理与实战 201607
Git原理与实战 201607Charles Tang
 
工程師必備第一工具 - Git
工程師必備第一工具 - Git工程師必備第一工具 - Git
工程師必備第一工具 - GitAlan Tsai
 
用 Go 語言 打造微服務架構
用 Go 語言打造微服務架構用 Go 語言打造微服務架構
用 Go 語言 打造微服務架構Bo-Yi Wu
 
Visual Studio 2015 與 Git 開發實戰
Visual Studio 2015 與 Git 開發實戰Visual Studio 2015 與 Git 開發實戰
Visual Studio 2015 與 Git 開發實戰Will Huang
 
Using google appengine_1027
Using google appengine_1027Using google appengine_1027
Using google appengine_1027Wei Sun
 
Git與source tree 基礎教學
Git與source tree 基礎教學Git與source tree 基礎教學
Git與source tree 基礎教學Duncan Chen
 
Git flow 與團隊合作
Git flow 與團隊合作Git flow 與團隊合作
Git flow 與團隊合作Bo-Yi Wu
 
版本控制 使用Git & git hub
版本控制   使用Git & git hub版本控制   使用Git & git hub
版本控制 使用Git & git hub維佋 唐
 
Proto actor 串接 Go 與 C# 簡易上手
Proto actor 串接 Go 與 C# 簡易上手Proto actor 串接 Go 與 C# 簡易上手
Proto actor 串接 Go 與 C# 簡易上手Chen Yu Pao
 
Ian 20150515 grunt
Ian 20150515 gruntIan 20150515 grunt
Ian 20150515 gruntLearningTech
 
Github in xcode
Github in xcodeGithub in xcode
Github in xcode郁凱 曾
 

What's hot (20)

Introduction to git
Introduction to gitIntroduction to git
Introduction to git
 
淡江Git與GitHub操作介紹
淡江Git與GitHub操作介紹淡江Git與GitHub操作介紹
淡江Git與GitHub操作介紹
 
Git 版本控制 (使用教學)
Git 版本控制 (使用教學)Git 版本控制 (使用教學)
Git 版本控制 (使用教學)
 
A successful git branching model 導讀
A successful git branching model 導讀A successful git branching model 導讀
A successful git branching model 導讀
 
Git 实战
Git 实战Git 实战
Git 实战
 
Git内部培训文档
Git内部培训文档Git内部培训文档
Git内部培训文档
 
寫給大家的 Git 教學
寫給大家的 Git 教學寫給大家的 Git 教學
寫給大家的 Git 教學
 
Xcode 的 git 版本管理
Xcode 的 git 版本管理Xcode 的 git 版本管理
Xcode 的 git 版本管理
 
Git基礎介紹
Git基礎介紹Git基礎介紹
Git基礎介紹
 
Git原理与实战 201607
Git原理与实战 201607Git原理与实战 201607
Git原理与实战 201607
 
工程師必備第一工具 - Git
工程師必備第一工具 - Git工程師必備第一工具 - Git
工程師必備第一工具 - Git
 
用 Go 語言 打造微服務架構
用 Go 語言打造微服務架構用 Go 語言打造微服務架構
用 Go 語言 打造微服務架構
 
Visual Studio 2015 與 Git 開發實戰
Visual Studio 2015 與 Git 開發實戰Visual Studio 2015 與 Git 開發實戰
Visual Studio 2015 與 Git 開發實戰
 
Using google appengine_1027
Using google appengine_1027Using google appengine_1027
Using google appengine_1027
 
Git與source tree 基礎教學
Git與source tree 基礎教學Git與source tree 基礎教學
Git與source tree 基礎教學
 
Git flow 與團隊合作
Git flow 與團隊合作Git flow 與團隊合作
Git flow 與團隊合作
 
版本控制 使用Git & git hub
版本控制   使用Git & git hub版本控制   使用Git & git hub
版本控制 使用Git & git hub
 
Proto actor 串接 Go 與 C# 簡易上手
Proto actor 串接 Go 與 C# 簡易上手Proto actor 串接 Go 與 C# 簡易上手
Proto actor 串接 Go 與 C# 簡易上手
 
Ian 20150515 grunt
Ian 20150515 gruntIan 20150515 grunt
Ian 20150515 grunt
 
Github in xcode
Github in xcodeGithub in xcode
Github in xcode
 

Similar to Git

Git in a nutshell
Git in a nutshellGit in a nutshell
Git in a nutshellNelson Tai
 
Git 入门实战
Git 入门实战Git 入门实战
Git 入门实战icy leaf
 
Git 超簡單學習懶人包(軟體程式版本控管系統)
Git 超簡單學習懶人包(軟體程式版本控管系統)Git 超簡單學習懶人包(軟體程式版本控管系統)
Git 超簡單學習懶人包(軟體程式版本控管系統)flylon
 
Git Essence Tutorial
Git Essence TutorialGit Essence Tutorial
Git Essence TutorialHo Kim
 
大家應該都要會的工具 Git 從放棄到會用2-分支篇
大家應該都要會的工具 Git   從放棄到會用2-分支篇大家應該都要會的工具 Git   從放棄到會用2-分支篇
大家應該都要會的工具 Git 從放棄到會用2-分支篇Alan Tsai
 
Git & git hub v1.2
Git & git hub v1.2Git & git hub v1.2
Git & git hub v1.2Chris Chen
 
Git 版本控制系統 -- 從微觀到宏觀
Git 版本控制系統 -- 從微觀到宏觀Git 版本控制系統 -- 從微觀到宏觀
Git 版本控制系統 -- 從微觀到宏觀Wen-Tien Chang
 
腾讯大讲堂46 自由cgi之路v3
腾讯大讲堂46 自由cgi之路v3腾讯大讲堂46 自由cgi之路v3
腾讯大讲堂46 自由cgi之路v3areyouok
 
腾讯大讲堂46 自由cgi之路v3
腾讯大讲堂46 自由cgi之路v3腾讯大讲堂46 自由cgi之路v3
腾讯大讲堂46 自由cgi之路v3topgeek
 
Git tutorial for windows user (給 Windows user 的 Git 教學)
Git tutorial for windows user (給 Windows user 的 Git 教學)Git tutorial for windows user (給 Windows user 的 Git 教學)
Git tutorial for windows user (給 Windows user 的 Git 教學)Cloud Tu
 
Introduction to Golang final
Introduction to Golang final Introduction to Golang final
Introduction to Golang final Paul Chao
 
COSCUP 2015 開源之道-Git工作坊教學簡報
COSCUP 2015 開源之道-Git工作坊教學簡報COSCUP 2015 開源之道-Git工作坊教學簡報
COSCUP 2015 開源之道-Git工作坊教學簡報Bachue Zhou
 
Continuous Delivery: automated testing, continuous integration and continuous...
Continuous Delivery: automated testing, continuous integration and continuous...Continuous Delivery: automated testing, continuous integration and continuous...
Continuous Delivery: automated testing, continuous integration and continuous...Jimmy Lai
 
First meetingwithgit
First meetingwithgitFirst meetingwithgit
First meetingwithgitRhythm Sun
 
Git入门与实践
Git入门与实践Git入门与实践
Git入门与实践LC2009
 
Git使用入门
Git使用入门Git使用入门
Git使用入门dpf2e
 

Similar to Git (20)

Git in a nutshell
Git in a nutshellGit in a nutshell
Git in a nutshell
 
Git 入门实战
Git 入门实战Git 入门实战
Git 入门实战
 
Git 超簡單學習懶人包(軟體程式版本控管系統)
Git 超簡單學習懶人包(軟體程式版本控管系統)Git 超簡單學習懶人包(軟體程式版本控管系統)
Git 超簡單學習懶人包(軟體程式版本控管系統)
 
Git Essence Tutorial
Git Essence TutorialGit Essence Tutorial
Git Essence Tutorial
 
Git Tutorial
Git TutorialGit Tutorial
Git Tutorial
 
軟體工程(總結篇)
軟體工程(總結篇)軟體工程(總結篇)
軟體工程(總結篇)
 
大家應該都要會的工具 Git 從放棄到會用2-分支篇
大家應該都要會的工具 Git   從放棄到會用2-分支篇大家應該都要會的工具 Git   從放棄到會用2-分支篇
大家應該都要會的工具 Git 從放棄到會用2-分支篇
 
Git & git hub v1.2
Git & git hub v1.2Git & git hub v1.2
Git & git hub v1.2
 
Git 版本控制系統 -- 從微觀到宏觀
Git 版本控制系統 -- 從微觀到宏觀Git 版本控制系統 -- 從微觀到宏觀
Git 版本控制系統 -- 從微觀到宏觀
 
腾讯大讲堂46 自由cgi之路v3
腾讯大讲堂46 自由cgi之路v3腾讯大讲堂46 自由cgi之路v3
腾讯大讲堂46 自由cgi之路v3
 
腾讯大讲堂46 自由cgi之路v3
腾讯大讲堂46 自由cgi之路v3腾讯大讲堂46 自由cgi之路v3
腾讯大讲堂46 自由cgi之路v3
 
Git簡報
Git簡報Git簡報
Git簡報
 
Git 經驗分享
Git 經驗分享Git 經驗分享
Git 經驗分享
 
Git tutorial for windows user (給 Windows user 的 Git 教學)
Git tutorial for windows user (給 Windows user 的 Git 教學)Git tutorial for windows user (給 Windows user 的 Git 教學)
Git tutorial for windows user (給 Windows user 的 Git 教學)
 
Introduction to Golang final
Introduction to Golang final Introduction to Golang final
Introduction to Golang final
 
COSCUP 2015 開源之道-Git工作坊教學簡報
COSCUP 2015 開源之道-Git工作坊教學簡報COSCUP 2015 開源之道-Git工作坊教學簡報
COSCUP 2015 開源之道-Git工作坊教學簡報
 
Continuous Delivery: automated testing, continuous integration and continuous...
Continuous Delivery: automated testing, continuous integration and continuous...Continuous Delivery: automated testing, continuous integration and continuous...
Continuous Delivery: automated testing, continuous integration and continuous...
 
First meetingwithgit
First meetingwithgitFirst meetingwithgit
First meetingwithgit
 
Git入门与实践
Git入门与实践Git入门与实践
Git入门与实践
 
Git使用入门
Git使用入门Git使用入门
Git使用入门