Enviar pesquisa
Carregar
Git基礎介紹
•
Transferir como PPTX, PDF
•
2 gostaram
•
1,014 visualizações
Max Ma
Seguir
git版控概念 基本介紹
Leia menos
Leia mais
Software
Denunciar
Compartilhar
Denunciar
Compartilhar
1 de 54
Baixar agora
Recomendados
工程師必備第一工具 - Git
工程師必備第一工具 - Git
Alan Tsai
寫給大家的 Git 教學
寫給大家的 Git 教學
littlebtc
Git Tutorial 教學
Git Tutorial 教學
Wen-Tien Chang
Git由超淺入超深
Git由超淺入超深
羊 小咩 (lamb-mei)
ノンプログラマでも今日から使える「Git」でバージョン管理
ノンプログラマでも今日から使える「Git」でバージョン管理
H2O Space. Co., Ltd.
デザイナのためのGit入門
デザイナのためのGit入門
dsuke Takaoka
Git 版本控制 (使用教學)
Git 版本控制 (使用教學)
Jui An Huang (黃瑞安)
版本控制 使用Git & git hub
版本控制 使用Git & git hub
維佋 唐
Recomendados
工程師必備第一工具 - Git
工程師必備第一工具 - Git
Alan Tsai
寫給大家的 Git 教學
寫給大家的 Git 教學
littlebtc
Git Tutorial 教學
Git Tutorial 教學
Wen-Tien Chang
Git由超淺入超深
Git由超淺入超深
羊 小咩 (lamb-mei)
ノンプログラマでも今日から使える「Git」でバージョン管理
ノンプログラマでも今日から使える「Git」でバージョン管理
H2O Space. Co., Ltd.
デザイナのためのGit入門
デザイナのためのGit入門
dsuke Takaoka
Git 版本控制 (使用教學)
Git 版本控制 (使用教學)
Jui An Huang (黃瑞安)
版本控制 使用Git & git hub
版本控制 使用Git & git hub
維佋 唐
15分でわかるGit入門
15分でわかるGit入門
to_ueda
Gitはじめの一歩
Gitはじめの一歩
Ayana Yokota
はじめてのGit forデザイナー&コーダー
はじめてのGit forデザイナー&コーダー
Saeko Yamamoto
一人でもはじめるGitでバージョン管理
一人でもはじめるGitでバージョン管理
Takafumi Yoshida
バージョン管理のワークフロー
バージョン管理のワークフロー
add20
初心者 Git 上手攻略
初心者 Git 上手攻略
Lucien Lee
Introduction to git
Introduction to git
Randal Schwartz
いつやるの?Git入門
いつやるの?Git入門
Masakazu Matsushita
やりなおせる Git 入門
やりなおせる Git 入門
Tomohiko Himura
Git 版本控制系統 -- 從微觀到宏觀
Git 版本控制系統 -- 從微觀到宏觀
Wen-Tien Chang
Gitのよく使うコマンド
Gitのよく使うコマンド
YUKI Kaoru
社内Git勉強会向け資料
社内Git勉強会向け資料
Hiroki Saiki
Git and GitHub
Git and GitHub
James Gray
Git One Day Training Notes
Git One Day Training Notes
glen_a_smith
はじめようGit
はじめようGit
techscore
Advanced Git
Advanced Git
Sergiu-Ioan Ungur
Git workflows
Git workflows
Sergiu Savva
Git - Basic Crash Course
Git - Basic Crash Course
Nilay Binjola
Git vs svn
Git vs svn
Rupesh Kumar
Learning Git and GitHub - BIT GDSC.pdf
Learning Git and GitHub - BIT GDSC.pdf
Jayprakash677449
Getting Git Right
Getting Git Right
Sven Peters
Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners
HubSpot
Mais conteúdo relacionado
Mais procurados
15分でわかるGit入門
15分でわかるGit入門
to_ueda
Gitはじめの一歩
Gitはじめの一歩
Ayana Yokota
はじめてのGit forデザイナー&コーダー
はじめてのGit forデザイナー&コーダー
Saeko Yamamoto
一人でもはじめるGitでバージョン管理
一人でもはじめるGitでバージョン管理
Takafumi Yoshida
バージョン管理のワークフロー
バージョン管理のワークフロー
add20
初心者 Git 上手攻略
初心者 Git 上手攻略
Lucien Lee
Introduction to git
Introduction to git
Randal Schwartz
いつやるの?Git入門
いつやるの?Git入門
Masakazu Matsushita
やりなおせる Git 入門
やりなおせる Git 入門
Tomohiko Himura
Git 版本控制系統 -- 從微觀到宏觀
Git 版本控制系統 -- 從微觀到宏觀
Wen-Tien Chang
Gitのよく使うコマンド
Gitのよく使うコマンド
YUKI Kaoru
社内Git勉強会向け資料
社内Git勉強会向け資料
Hiroki Saiki
Git and GitHub
Git and GitHub
James Gray
Git One Day Training Notes
Git One Day Training Notes
glen_a_smith
はじめようGit
はじめようGit
techscore
Advanced Git
Advanced Git
Sergiu-Ioan Ungur
Git workflows
Git workflows
Sergiu Savva
Git - Basic Crash Course
Git - Basic Crash Course
Nilay Binjola
Git vs svn
Git vs svn
Rupesh Kumar
Learning Git and GitHub - BIT GDSC.pdf
Learning Git and GitHub - BIT GDSC.pdf
Jayprakash677449
Mais procurados
(20)
15分でわかるGit入門
15分でわかるGit入門
Gitはじめの一歩
Gitはじめの一歩
はじめてのGit forデザイナー&コーダー
はじめてのGit forデザイナー&コーダー
一人でもはじめるGitでバージョン管理
一人でもはじめるGitでバージョン管理
バージョン管理のワークフロー
バージョン管理のワークフロー
初心者 Git 上手攻略
初心者 Git 上手攻略
Introduction to git
Introduction to git
いつやるの?Git入門
いつやるの?Git入門
やりなおせる Git 入門
やりなおせる Git 入門
Git 版本控制系統 -- 從微觀到宏觀
Git 版本控制系統 -- 從微觀到宏觀
Gitのよく使うコマンド
Gitのよく使うコマンド
社内Git勉強会向け資料
社内Git勉強会向け資料
Git and GitHub
Git and GitHub
Git One Day Training Notes
Git One Day Training Notes
はじめようGit
はじめようGit
Advanced Git
Advanced Git
Git workflows
Git workflows
Git - Basic Crash Course
Git - Basic Crash Course
Git vs svn
Git vs svn
Learning Git and GitHub - BIT GDSC.pdf
Learning Git and GitHub - BIT GDSC.pdf
Destaque
Getting Git Right
Getting Git Right
Sven Peters
Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners
HubSpot
Git 101 Presentation
Git 101 Presentation
Scott Chacon
InterConnect2016_4932
InterConnect2016_4932
Clare Carty
New Continuous Release and Deployment Capabilities for CICS Customers v4
New Continuous Release and Deployment Capabilities for CICS Customers v4
Susan Yoskin
Basic principles of Git
Basic principles of Git
phuongvohuy
Integrations, UI Enhancements and Cloud – See What’s New with IBM UrbanCode D...
Integrations, UI Enhancements and Cloud – See What’s New with IBM UrbanCode D...
IBM UrbanCode Products
Git-ing out of your git messes
Git-ing out of your git messes
Katie Sylor-Miller
GitSlides
GitSlides
Federico Spinelli
Sys05 uso consapevole di git - beyond the basic
Sys05 uso consapevole di git - beyond the basic
DotNetCampus
GITT (part 1 of 2)
GITT (part 1 of 2)
Ali Servet Donmez
Linux Day 2015 Genova
Linux Day 2015 Genova
mperrando
Perchè Git?
Perchè Git?
Mauro Ferratello
Git–SVN
Git–SVN
Ali Servet Donmez
Introduzione a GIT - Laboratorio di Web Design 2014/15
Introduzione a GIT - Laboratorio di Web Design 2014/15
Giovanni Buffa
Git tutorial
Git tutorial
Pham Quy (Jack)
Introduzione a git
Introduzione a git
Marco Santonocito
Introduzione a Git
Introduzione a Git
Stefano Valle
Git best practices
Git best practices
Matteo Gavagnin
Mini git tutorial
Mini git tutorial
Cristian Lucchesi
Destaque
(20)
Getting Git Right
Getting Git Right
Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners
Git 101 Presentation
Git 101 Presentation
InterConnect2016_4932
InterConnect2016_4932
New Continuous Release and Deployment Capabilities for CICS Customers v4
New Continuous Release and Deployment Capabilities for CICS Customers v4
Basic principles of Git
Basic principles of Git
Integrations, UI Enhancements and Cloud – See What’s New with IBM UrbanCode D...
Integrations, UI Enhancements and Cloud – See What’s New with IBM UrbanCode D...
Git-ing out of your git messes
Git-ing out of your git messes
GitSlides
GitSlides
Sys05 uso consapevole di git - beyond the basic
Sys05 uso consapevole di git - beyond the basic
GITT (part 1 of 2)
GITT (part 1 of 2)
Linux Day 2015 Genova
Linux Day 2015 Genova
Perchè Git?
Perchè Git?
Git–SVN
Git–SVN
Introduzione a GIT - Laboratorio di Web Design 2014/15
Introduzione a GIT - Laboratorio di Web Design 2014/15
Git tutorial
Git tutorial
Introduzione a git
Introduzione a git
Introduzione a Git
Introduzione a Git
Git best practices
Git best practices
Mini git tutorial
Mini git tutorial
Semelhante a Git基礎介紹
Introduction to git
Introduction to git
Bo-Yi Wu
Git 教學
Git 教學
Ming-Sian Lin
Git & git hub v1.2
Git & git hub v1.2
Chris Chen
Git 程式碼版本控制軟體介紹
Git 程式碼版本控制軟體介紹
PingLun Liao
Git in a nutshell
Git in a nutshell
Nelson Tai
Git 入门实战
Git 入门实战
icy leaf
20170510 git 懶人包
20170510 git 懶人包
Chen-Ming Yang
Git 超簡單學習懶人包(軟體程式版本控管系統)
Git 超簡單學習懶人包(軟體程式版本控管系統)
flylon
Git教學
Git教學
Sitg Yao
Git Tutorial
Git Tutorial
Drake Huang
Git Essence Tutorial
Git Essence Tutorial
Ho Kim
Git使用入门
Git使用入门
dpf2e
Git share
Git share
mactanxin
Git tutorial for windows user (給 Windows user 的 Git 教學)
Git tutorial for windows user (給 Windows user 的 Git 教學)
Cloud Tu
Git原理与实战 201607
Git原理与实战 201607
Charles Tang
Git introduction
Git introduction
mythnc
Git内部培训文档
Git内部培训文档
superwen
Git and git hub
Git and git hub
唯 李
Git 使用介绍
Git 使用介绍
medcl
First meetingwithgit
First meetingwithgit
Rhythm Sun
Semelhante a Git基礎介紹
(20)
Introduction to git
Introduction to git
Git 教學
Git 教學
Git & git hub v1.2
Git & git hub v1.2
Git 程式碼版本控制軟體介紹
Git 程式碼版本控制軟體介紹
Git in a nutshell
Git in a nutshell
Git 入门实战
Git 入门实战
20170510 git 懶人包
20170510 git 懶人包
Git 超簡單學習懶人包(軟體程式版本控管系統)
Git 超簡單學習懶人包(軟體程式版本控管系統)
Git教學
Git教學
Git Tutorial
Git Tutorial
Git Essence Tutorial
Git Essence Tutorial
Git使用入门
Git使用入门
Git share
Git share
Git tutorial for windows user (給 Windows user 的 Git 教學)
Git tutorial for windows user (給 Windows user 的 Git 教學)
Git原理与实战 201607
Git原理与实战 201607
Git introduction
Git introduction
Git内部培训文档
Git内部培训文档
Git and git hub
Git and git hub
Git 使用介绍
Git 使用介绍
First meetingwithgit
First meetingwithgit
Git基礎介紹
1.
Git
2.
Outline ❖ What’s Git? ❖
Why Git? ❖ Basic Operation ➢ Setup ➢ Status Transformation ➢ GitLab & Cooperation ❖ Branch ❖ Branch Management 2
3.
What’s Git? Distributed Version
Control 「教授今天給了回家作業,題目放在講桌,下課離開前記得拿 回家寫,下次上課一起交到講桌」 3
4.
What’s Git? Distributed Version
Control 「下課離開前記得拿回家寫」 4 ❏ 大家題目都一樣 ❏ 這作業離開學校一樣能寫 ❏ 互不受干擾 ❏ 可協作
5.
Why Git? Local Branching
and Merging 5
6.
Why Git? Small and
Fast 6
7.
Why Git? Staging Area 7
8.
Why Git? Distributed &
GitLab 8
9.
Basic Operation ❖ Setup ❖
Status Transformation ❖ GitLab & Cooperation 9
10.
Setup Git Download 設定識別資料 檢視所有Config設定 檢視/修改
Config的某個參數 $ git config --global user.name “aaabbb” $ git config --global user.email aaabbb@gmail.com $ git config --list $ git config user.name # 檢視 $ git config user.name “xxxxx” # 修改 10
11.
Git Initial 在現有無版控的專案 $ cd
<專案的資料夾路徑> $ git init $ git status #可以先看個檔案狀態 $ git add . $ git status #add後也可以看個檔案狀態 $ git commit -m “intitial commit” 在要clone下來的某個路徑 #下載一整個remote專案包括所有歷史紀錄 $ git clone <Repository Directory> 11
12.
Status Transformation 工作目錄底下的檔案可以分作兩種:被追蹤 &
尚被追蹤 只有被追蹤的檔案能 作版本控管 12
13.
Status Transformation 已修改 已暫存
已提交 已上傳 工作目錄 暫存目錄 git目錄 GitLab add commit clone/fetch push checkout Local 13
14.
14
15.
Status Transformation -
Track Files 檢視當前git所管理的資料狀態 $ git status 新增要追蹤的檔案 $ git add index.html 一次把目錄下的所有檔案加入: $ git add . 15
16.
Status Transformation -
Modify Tracked Files 已修改 已暫存 工作目錄 暫存目錄 add modify 修改一個先前已經追蹤過的檔案 修改一個先前已經追蹤過的檔案 $ git status $ git add index.html $ git status 16
17.
Status Transformation -Ignored
Files 忽略不想追蹤的檔案 git add . 不會加進來 git status 不會去檢查 {path}/.gitignore 17
18.
Status Transformation -
Commit Files 提交站存區裡的內容到git資料庫 $ git commit -m “commit message” #或是 $ git commit 跳過提交暫存區的動作 直接commit $ git commit -a -m “commit message” 已修改 已暫存 已提交 工作目錄 暫存目錄 git目錄 git commit -m git commit -a -m 18
19.
GitLab & Cooperation
- SSH Key Generate SSH Key & Add it to GitLab: https://gitlab.com/help/ssh/README 19
20.
GitLab & Cooperation
- Add Remote Repository 新增remote repository URL # git remote add <name> <url> $ git remote add origin https://gitlab.softbi.com/OCB_WMS/OCB_WMS_AP.git $ git remote add origin ssh://git@gitlab.softbi.com:3078/OCB_WMS/OCB_WMS_AP.git 檢視remote git 清單 $ git remote -v http(s): 可讀寫,方便,較慢 ssh: 適合讀寫,一定是加密,較快 git: 唯讀 20
21.
GitLab & Cooperation
- Push & Pull push to remote # 將master branch 上傳到remote origin倉庫 $ git push origin master # 上傳到remote origin倉庫並且追蹤該branch $ git push -u origin master pull from remote # 將remote的master branch $ git pull origin master 其他pull方式 # 避免無謂的merge可下 $ git pull --rebase origin master # 先將remote所有branch/tag拉下來,再作rebase $ git fetch $ git rebase origin/master 21
22.
Branch - Commit
Log 22
23.
Branch - Commit
Log 23
24.
Branch - Create
Branch 新增branch $ git branch testing HEAD所指的地方就是目前commit 預設branch為master 新增一個branch -> testing 24
25.
Branch - Checkout
Branch 切換branch $ git checkout testing 接下來commit會發 生什麼事呢? 25
26.
Branch - Commit
in another Branch 26
27.
Branch - Branch
Split $ git checkout master $ git commit -a -m “modify something” 27
28.
Branch - Merge $
git checkout -b iss53 $ git commit -a -m “modify something” 28 今天有個issue53要修正
29.
Branch - Merge $
git checkout master $ git checkout -b hotfix $ git commit -a -m “fixed the bug” 29 發現有個bug要緊急修正
30.
$ git checkout
master $ git merge hotfix 30
31.
$ git branch
-d hotfix $ git checkout iss53 $ git commit -a -m “modify something” 31
32.
$ git checkout
master $ git merge iss53 $ git branch -d iss53 32
33.
Branch - Conflict 在不同的branch上,修改了同一個檔案的同一部分,merge時就會衝突而無法順 利地合併 $
git merge iss53 Auto-merging index.html CONFLICT (content): Merge conflict in index.html Automatic merge failed; fix conflicts and then commit the result. 33
34.
Branch - Conflict
Recovery <<<<<<< HEAD <div id="footer">contact : email.support@github.com</div> ======= <div id="footer"> please contact us at support@github.com </div> >>>>>>> iss53 <div id="footer"> please contact us at support@github.com </div> 手動決定要保留的部分 34
35.
Branch - Conflict
Recovery # 確認檔案狀態 $ git status On branch master Changes to be committed: (use "git reset HEAD <file>..." to unstage) modified: index.html # 確認解決衝突後就可以commit出去 # 直接下git commit即可,git會自動加Merge branch ‘iss53’ into master的message $ git commit 35
36.
Branch - Conflict
Recovery 發生confict 時的處理步驟: 1. 抉擇conflict files要留下哪個branch內容(或是兩邊都有一些code要保留) 2. 使用git add 將處理好的檔案加入stage 3. 反覆步驟 1~2 直到所有 confict 處理完畢 4. git commit 提交合併訊息 36
37.
Branch - Stash 37 $
git status $ git stash $ git stash list $ git stash pop $ git stash pop stash@{n}
38.
Branch - Rebase 38 $
git checkout master $ git merge experiment
39.
Branch - Rebase 39 $
git checkout experiment $ git rebase master $ git checkout master $ git merge experiment
40.
Branch - Reset $
git reset HEAD^ $ git reset HEAD <file> $ git reset HEAD~3 $ git reset <commit> 40
41.
Branch - Revert 41 #
還原某一個commit的變更內容,並且commit $ git revert <commit>
42.
42 Working Directory Staging Area Local Repository Remote/Origin Repository Remote Repository Local Remote git add
git commit git push git pull git merge git fetch git fetchgit rebase git pull --rebase
43.
Branch Management Git/Github Flow GUI
Tool - SourceTree 43
44.
Branch Management 44
45.
Git Flow -
Master & Develop branch 45https://github.com/nvie/gitflow/wiki/Installation
46.
Git Flow -
Develop & Feature branch $ git flow feature start myfeature # 等於以下的事情 $ git checkout -b feature/myfeature develop $ git flow feature finish myfeature # 等於以下的事情 $ git checkout develop $ git merge --no-ff myfeature $ git branch -d feature/myfeature 46
47.
Git Flow -
Release & Hotfix branch 47
48.
48
49.
Github Flow 49
50.
SourceTree 50 教學
51.
SVN to Git #
git svn clone <svn repository> --stdlayout $ git svn clone svn://bisvn.softbi.com:80/taiwan/OCB/WMS/SRC/AP --stdlayout $ git svn clone <svn repository> --trunk=<主幹路徑> -- branches=<分支路徑> --tags=<標籤路徑> $ git svn show-ignore >> .gitignore $ git add .gitignore $ git commit -m “convert svn:ignore properties to .gitignore” 51
52.
Practice : 連結 52
53.
53 博客來
54.
Q&A 54
Notas do Editor
資料來源 https://git-scm.com/book/zh-tw/v1 http://zoomq.qiniudn.com/ZQScrapBook/ZqFLOSS/data/20081210180347/
Baixar agora