SlideShare uma empresa Scribd logo
1 de 96
Baixar para ler offline
1
20160921
Git
ReactJS
,Michael Huang
NodeJs
Docker
Android
Introduction
3
....
......
vs
5
.....
Git Concept
8
git
Workspace LocalRepoStageArea RemoteRepo
Local Remote
Git GUI Tools
10
Github Tower SourceTree
Mac/Windows Mac Mac/Windows
11
12
GUI
CommandLine
13
14
Git Install
15
16
brew install git
Mac
18
sudo!
apt-get install git
Ubuntu/Debian
19
sudo!
yum install git-core
Fedora/CentOS
20
download
Windows
21
Git Setup
git
22
git config --global user.name”your name”
git config --global user.mail”your@mail”
mail
23
Git Basic
24
git init
25
Workspace LocalRepoStageArea RemoteRepo
Local Remote
git init
git init
.....
Coding
27
Stage
git add .
28
Workspace LocalRepoStageArea RemoteRepo
Local Remote
git add.
29
fileA fileB Stage
git add fileA fileB
30
Workspace LocalRepoStageArea RemoteRepo
Local Remote
git add fileA fileB
30
git commit -m ”message”
31
Workspace LocalRepoStageArea RemoteRepo
Local Remote
git commit
31
Git Workflow
32
Coding / git add / git commit
git add / git commit
33
Workspace LocalRepoStageArea RemoteRepo
Local Remote
git add
33
git commitCoding
git status
34
Workspace LocalRepoStageArea RemoteRepo
Local Remote
git status
3434
35
git status
Git Branch
36
git branch BranchName
37
master
test
git branch BranchName
38
master test
git branch test
git add …

git commit………
git
39
Coding
Stage
git add .
git commit -m ”message”
40
master test
git add …

git commit………
git
41
master test
git add …

git commit………
git
.........
42
master test
git checkout master
master
git checkout master
43
test
test
git merge BranchName
master
git merge test
................
44
Orz.........
45
.........
46
.........
47
.....
48
git add …

git commit………
git
49
Coding
Stage
git add .
git commit -m ”message”
OMG.……
git add
git commit …
50
51
git stash
52
....
git stash save -u " "
53
…
54
commit
git reset --hard
55
master
git log
56
commit hash code

commit message
Hash Code
57
hash code
git log --oneline
58
git log --decorate
59
git log --graph
60
git log -p
61
git log -stat
62
log
git log --graph --online
63
log
git log --stat --online
64
num
git log -num
65
time
git log --after=“time”
time
git log“time”--before
commit
git diff
66
-p
git diff -p
67
.....
git blame
68
method
git blame -l 12,22
69
…..
git tag v1.0.0
70
git rebase
71
Origin
New Base
Git Remote
72
Repository(Repo)
73
Github VS Git
• Git —>
• Github —> Git
....
Create New Repo on Github
75
git remote add origin https://github…..
78
git clone https://github…..
79
git clone
Remote Local
git add …

git commit………
git
80
Coding
Stage
git add .
git commit -m ”message”
... ...................
git push
81
Workspace LocalRepoStageArea RemoteRepo
Local Remote
git push
... ...................
git pull
82
git fork
83
84
85
86
git clone
git clone
87
git commit
88
git commit
89
A push
90
B push
91
B push….
reject
.....
93
B pull
(fetch merge)
fetch
94
B merge
95
B push
95
Q&A
96

Mais conteúdo relacionado

Destaque

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Destaque (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

20160921線上讀書會git教學