Slide 1

Slide 1 text

ℂ 獈槹 ک㿁褧ݳ֢樄咳 Mouson 檔֚ᒓ Duncan 讙෈盓 Laradubet #03 - 2016.08.18 @ i

Slide 2

Slide 2 text

https://goo.gl/ECb425

Slide 3

Slide 3 text

瞲犤च器

Slide 4

Slide 4 text

git 玟ऒ獤觊 Local Local Repo/ Master Staging Area Workspace

Slide 5

Slide 5 text

git init - 虻碘䓚ڡত Local Local Repo/ Master Staging Area Workspace git init

Slide 6

Slide 6 text

git init - 虻碘䓚ڡত Local Local Repo/ Master Staging Area Workspace git init

Slide 7

Slide 7 text

git status Local Local Repo/ Master Staging Area Workspace git status

Slide 8

Slide 8 text

git status Local Local Repo/ Master Staging Area Workspace git status

Slide 9

Slide 9 text

git add [folder/file] 碝ी Local Local Repo/ Master Staging Area Workspace git add

Slide 10

Slide 10 text

git commit Local Local Repo/ Master Staging Area Workspace git add git commit

Slide 11

Slide 11 text

git add & commit 奲ݳದ Local Local Repo/ Master Staging Area Workspace

Slide 12

Slide 12 text

git add & commit 奲ݳದ Local Local Repo/ Master Staging Area Workspace Hunk A

Slide 13

Slide 13 text

git add & commit 奲ݳದ Local Local Repo/ Master Staging Area Workspace git add Hunk A

Slide 14

Slide 14 text

git add & commit 奲ݳದ Local Local Repo/ Master Staging Area Workspace git add git commit Hunk A

Slide 15

Slide 15 text

git add & commit 奲ݳದ Local Local Repo/ Master Staging Area Workspace git add git commit Hunk A HASH A

Slide 16

Slide 16 text

git add & commit 奲ݳದ Local Local Repo/ Master Staging Area Workspace Hunk A HASH A

Slide 17

Slide 17 text

git add & commit 奲ݳದ Local Local Repo/ Master Staging Area Workspace Hunk A HASH A Hunk B Hunk C Hunk D

Slide 18

Slide 18 text

git add & commit 奲ݳದ Local Local Repo/ Master Staging Area Workspace git add Hunk A HASH A Hunk D Hunk B Hunk C

Slide 19

Slide 19 text

git add & commit 奲ݳದ Local Local Repo/ Master Staging Area Workspace git add git commit Hunk A HASH A Hunk D Hunk B Hunk C

Slide 20

Slide 20 text

git add & commit 奲ݳದ Local Local Repo/ Master Staging Area Workspace git add git commit Hunk A HASH A Hunk D Hunk B Hunk C HASH B

Slide 21

Slide 21 text

git add & commit 奲ݳದ Local Local Repo/ Master Staging Area Workspace Hunk A HASH A Hunk D Hunk B Hunk C HASH B

Slide 22

Slide 22 text

git add & commit 奲ݳದ Local Local Repo/ Master Staging Area Workspace git add Hunk A HASH A Hunk B Hunk C HASH B Hunk D

Slide 23

Slide 23 text

git add & commit 奲ݳದ Local Local Repo/ Master Staging Area Workspace git add git commit Hunk A HASH A Hunk B Hunk C HASH B Hunk D HASH C

Slide 24

Slide 24 text

git HEAD Local Local Repo/ Master Staging Area Workspace Hunk A HASH A Hunk B Hunk C HASH B Hunk D HASH C

Slide 25

Slide 25 text

git HEAD Local Local Repo/ Master Staging Area Workspace Hunk A HASH A Hunk B Hunk C HASH B Hunk D HASH C HEAD

Slide 26

Slide 26 text

git HEAD Local Local Repo/ Master Staging Area Workspace Hunk A HASH A Hunk B Hunk C HASH B Hunk D HASH C HEAD HEAD^

Slide 27

Slide 27 text

git HEAD Local Local Repo/ Master Staging Area Workspace Hunk A HASH A Hunk B Hunk C HASH B Hunk D HASH C HEAD HEAD^ HEAD^^

Slide 28

Slide 28 text

git reset --mixed ᯿ᗝ Local Local Repo/ Master Staging Area Workspace Hunk D HASH C Hunk A HASH A Hunk B Hunk C HASH B

Slide 29

Slide 29 text

git reset --mixed ᯿ᗝ Local Local Repo/ Master Staging Area Workspace —mixed HEAD^ Hunk D HASH C Hunk A HASH A Hunk B Hunk C HASH B

Slide 30

Slide 30 text

git reset --mixed ᯿ᗝ Local Local Repo/ Master Staging Area Workspace —mixed HEAD^ Hunk D Hunk A HASH A Hunk B Hunk C HASH B

Slide 31

Slide 31 text

git reset --soft ᯿ᗝ Local Local Repo/ Master Staging Area Workspace Hunk D HASH C Hunk A HASH A Hunk B Hunk C HASH B

Slide 32

Slide 32 text

git reset --soft ᯿ᗝ Local Local Repo/ Master Staging Area Workspace Hunk D HASH C Hunk A HASH A Hunk B Hunk C HASH B —soft HEAD^

Slide 33

Slide 33 text

git reset --soft ᯿ᗝ Local Local Repo/ Master Staging Area Workspace Hunk A HASH A Hunk B Hunk C HASH B —soft HEAD^ Hunk D

Slide 34

Slide 34 text

git reset --hard ᯿ᗝ Local Local Repo/ Master Staging Area Workspace Hunk D HASH C Hunk A HASH A Hunk B Hunk C HASH B

Slide 35

Slide 35 text

git reset --hard ᯿ᗝ Local Local Repo/ Master Staging Area Workspace Hunk D HASH C Hunk A HASH A Hunk B Hunk C HASH B git reset —hard HEAD^

Slide 36

Slide 36 text

git reset --hard ᯿ᗝ Local Local Repo/ Master Staging Area Workspace Hunk D Hunk A HASH A Hunk B Hunk C HASH B git reset —hard HEAD^

Slide 37

Slide 37 text

git reset --hard ᯿ᗝ Local Local Repo/ Master Staging Area Workspace Hunk A HASH A Hunk B Hunk C HASH B git reset —hard HEAD^

Slide 38

Slide 38 text

git reset […] ᯿ᗝ Local Local Repo/ Master Staging Area Workspace —mixed HEAD^ git reset —hard HEAD^ —soft HEAD^

Slide 39

Slide 39 text

git remote add origin git@git.. Local Remote Remote Repo/ Master Remote Repo/ Master Local Repo/ Master Staging Area Workspace HASH C HASH A HASH B

Slide 40

Slide 40 text

git push -u origin master Local Remote Remote Repo/ Master Remote Repo/ Master Local Repo/ Master Staging Area Workspace HASH C HASH A HASH B HASH C HASH A HASH B

Slide 41

Slide 41 text

git push -u origin master Local Remote Remote Repo/ Master Remote Repo/ Master Local Repo/ Master Staging Area Workspace git push HASH C HASH A HASH B HASH C HASH A HASH B

Slide 42

Slide 42 text

git push -u origin master Local Remote Remote Repo/ Master Remote Repo/ Master Local Repo/ Master Staging Area Workspace git push HASH C HASH A HASH B HASH C HASH A HASH B

Slide 43

Slide 43 text

git push -u origin master Local Remote Remote Repo/ Master Remote Repo/ Master Local Repo/ Master Staging Area Workspace git push HASH C HASH A HASH B HASH C HASH A HASH B HASH C HASH A HASH B

Slide 44

Slide 44 text

git fetch Local Remote Remote Repo/ Master Remote Repo/ Master Local Repo/ Master Staging Area Workspace HASH C HASH A HASH B HASH C HASH A HASH B HASH C HASH A HASH B

Slide 45

Slide 45 text

git fetch Local Remote Remote Repo/ Master Remote Repo/ Master Local Repo/ Master Staging Area Workspace HASH C HASH A HASH B HASH C HASH A HASH B HASH D HASH C HASH A HASH B HASH D

Slide 46

Slide 46 text

git fetch Local Remote Remote Repo/ Master Remote Repo/ Master Local Repo/ Master Staging Area Workspace HASH C HASH A HASH B HASH C HASH A HASH B git fetch HASH D HASH C HASH A HASH B HASH D

Slide 47

Slide 47 text

git fetch Local Remote Remote Repo/ Master Remote Repo/ Master Local Repo/ Master Staging Area Workspace HASH C HASH A HASH B HASH C HASH A HASH B git fetch HASH C HASH A HASH B HASH D HASH D

Slide 48

Slide 48 text

GIT BRANCH

Slide 49

Slide 49 text

git branch Local Remote Local Repo/ Master Staging Area Workspace HASH C HASH A HASH B Remote Repo/ Master Remote Repo/ Master HASH C HASH A HASH B HASH C HASH A HASH B HASH D HASH D

Slide 50

Slide 50 text

git branch Local Remote Local Repo/ Master HASH C HASH A HASH B

Slide 51

Slide 51 text

git branch Local Remote Local Repo/ Master HASH C HASH A HASH B

Slide 52

Slide 52 text

git branch Local Remote Local Repo/ Master Local Repo/ Develop HASH C HASH A HASH B git branch develop

Slide 53

Slide 53 text

git branch Local Remote Local Repo/ Master Local Repo/ Develop HASH C HASH A HASH B git branch develop HASH C HASH A HASH B

Slide 54

Slide 54 text

git branch Local Remote Local Repo/ Master Local Repo/ Develop HASH C HASH A HASH B git branch develop HASH C HASH A HASH B

Slide 55

Slide 55 text

git branch Local Remote Local Repo/ Master Local Repo/ Develop HASH C HASH A HASH B git branch develop HASH C HASH A HASH B

Slide 56

Slide 56 text

git branch Local Remote Local Repo/ Master Local Repo/ Develop HASH C HASH A HASH B git branch develop HASH C HASH A HASH B A B C

Slide 57

Slide 57 text

git branch Local Remote Local Repo/ Master Local Repo/ Develop HASH C HASH A HASH B git branch develop HASH C HASH A HASH B A B C Master (HEAD)

Slide 58

Slide 58 text

git branch Local Remote Local Repo/ Master Local Repo/ Develop HASH C HASH A HASH B git branch develop HASH C HASH A HASH B A B C Master Develop (HEAD)

Slide 59

Slide 59 text

Local git checkout -b [name] A B C Master (HEAD)

Slide 60

Slide 60 text

Local git checkout -b [name] A B C Master Develop (HEAD)

Slide 61

Slide 61 text

Local git checkout -b [name] A B C Master Develop (HEAD)

Slide 62

Slide 62 text

Local git checkout -b [name] A B C Master Develop (HEAD)

Slide 63

Slide 63 text

Local git checkout -b [name] A B C Master Develop (HEAD) D

Slide 64

Slide 64 text

Local git checkout -b [name] A B C Master Develop (HEAD) D

Slide 65

Slide 65 text

Local git merge develop A B C Develop Master (HEAD) D

Slide 66

Slide 66 text

Local git merge develop A B C Develop Master (HEAD) D

Slide 67

Slide 67 text

Local git merge develop --ff (fast-forward) A B C Develop Master (HEAD) D E

Slide 68

Slide 68 text

Local git merge develop --ff (fast-forward) A B C Develop Master (HEAD) D E

Slide 69

Slide 69 text

Local git merge develop --no-ff A B C Develop Master (HEAD) D E

Slide 70

Slide 70 text

Local git merge develop --no-ff A B C Develop Master (HEAD) D E F

Slide 71

Slide 71 text

Local git merge develop --no-ff A B C Develop Master (HEAD) D E F

Slide 72

Slide 72 text

Local git merge develop A B C Develop Master (HEAD) D E F

Slide 73

Slide 73 text

Local git merge develop A B C Develop Master (HEAD) D E G F

Slide 74

Slide 74 text

Local git merge develop A B C Develop Master (HEAD) D E G F

Slide 75

Slide 75 text

Local git merge develop A B C Develop Master (HEAD) D E G F ݝ胼蝱ᤈ no-ff

Slide 76

Slide 76 text

Local git rebase develop A B C Develop Master (HEAD) D E F

Slide 77

Slide 77 text

Local git rebase develop A B C Develop Master (HEAD) D E F base

Slide 78

Slide 78 text

Local base git rebase develop A B C Develop Master (HEAD) D E F

Slide 79

Slide 79 text

Local base git rebase develop A B C Develop Master (HEAD) D E F F'

Slide 80

Slide 80 text

Local base git rebase develop A B C Develop Master (HEAD) D E F F' ᯿碝懯ᓒ癩吖

Slide 81

Slide 81 text

Local base git rebase develop A B C Develop Master (HEAD) D E F F' ᯿碝懯ᓒ癩吖

Slide 82

Slide 82 text

Local base git rebase develop A B C Develop Master (HEAD) D E F F' ᯿碝懯ᓒ癩吖

Slide 83

Slide 83 text

git merge with remote

Slide 84

Slide 84 text

git merge Local Remote Remote Repo/ Master Remote Repo/ Master Local Repo/ Master Staging Area Workspace HASH C HASH A HASH B HASH C HASH A HASH B git fetch HASH D HASH C HASH A HASH B HASH D HASH D HASH D

Slide 85

Slide 85 text

git merge Local Remote Remote Repo/ Master Remote Repo/ Master Local Repo/ Master Staging Area Workspace HASH C HASH A HASH B HASH C HASH A HASH B git fetch HASH D HASH C HASH A HASH B HASH D HASH D git merge HASH D HASH D

Slide 86

Slide 86 text

git pull Local Remote Remote Repo/ Master Remote Repo/ Master Local Repo/ Master Staging Area Workspace git fetch git merge

Slide 87

Slide 87 text

git pull Local Remote Remote Repo/ Master Remote Repo/ Master Local Repo/ Master Staging Area Workspace git fetch git merge git pull

Slide 88

Slide 88 text

git pull --rebase Local Remote Remote Repo/ Master Remote Repo/ Master Local Repo/ Master Staging Area Workspace git fetch git rebase

Slide 89

Slide 89 text

git pull --rebase Local Remote Remote Repo/ Master Remote Repo/ Master Local Repo/ Master Staging Area Workspace git fetch git rebase git pull --rebase

Slide 90

Slide 90 text

GIT 䋿率 Demo

Slide 91

Slide 91 text

̿碍ڜ懯ᓒ̀䌕礯Օ奧 • 揲࿄羷碍 (Fibonacci Sequence) • P(0)=0, P(1)=1, P(N)=P(N-1)+P(N-2) • ૬᮷苭羷碍 (Padovan Sequence) • P(0)=P(1)=P(2)= 1, P(N)=P(N-2)+P(N-3)

Slide 92

Slide 92 text

̿碍ڜ懯ᓒ̀䌕礯Օ奧

Slide 93

Slide 93 text

git clone Local Remote Remote Repo/ Master Remote Repo/ Master Local Repo/ Master Staging Area Workspace git clone

Slide 94

Slide 94 text

Domo

Slide 95

Slide 95 text

Demo

Slide 96

Slide 96 text

No content

Slide 97

Slide 97 text

No content

Slide 98

Slide 98 text

No content

Slide 99

Slide 99 text

塅ֺጱ Github 蝫奾 https://github.com/mouson/laradebut3-demo

Slide 100

Slide 100 text

Recap

Slide 101

Slide 101 text

No content

Slide 102

Slide 102 text

蝱褩 git rebase

Slide 103

Slide 103 text

԰㵕藲碉 git rebase -i (--interactive)

Slide 104

Slide 104 text

狒ኸܻত娄瑽 git rebase -p (--preserve-merges)

Slide 105

Slide 105 text

Q & A

Slide 106

Slide 106 text

https://goo.gl/Ifte4S