SlideShare ist ein Scribd-Unternehmen logo
1 von 100
Git-4-Geeks
1st WEEK
DATE
GEEKY ACADEMY 2013
GEEK ACADEMY
2013
WHO ARE WE?
SALAH PIYA
Sala (Dean) Chalermthai
Siam Chamnan Kit
SChalermthai@sprint3r.com
Piya (Tae) Lumyong
-
piya.tae@gmail.com
GEEK ACADEMY
2013
WHO ARE YOU?
GEEK ACADEMY
2013
G
GIT
In software development, Git / tɡɪ / is a distributed version control and
source code management (SCM) system with an emphasis on speed. Initially designed and
developed by Linus Torvalds for Linux kernel development, Git has since been adopted by
many other projects.
GEEK ACADEMY
2013
Git History
o Linux submitting patches model is quite interesting & unique in that time
o Linus hates CVS so much, he never believe in it
o He was in doomed maintaining Linux Kernel using Tarball + patch
o BitMover offer BitKeeper free usage. BitKeeper saved his life, but just for a while
o BitKeeper has a very strict Software License. People start to get upset
o Politics happened. Linus needs a replacement for BitKeeper
o Key criteria are:
o Needs to be Distributed SCM, like BitKeeper
o Needs to be highly Performance. 3 seconds max to apply a patch
o Guaranteed what goes in comes out correctly.
GEEK ACADEMY
2013
Git History
• Nothing matches the criteria. Linus decided to creates his own SCM, Git.
• After the 2.6.12-rc2 Linux kernel development release, he make an announce:
“I’m not going to touch linux until I have a
replacement of BitKeepers” -- Linus Torvalds
GEEK ACADEMY
2013
Git History
• Kernel 2.6.12 release was managed by Git
• Junio Harmano, major contributor was responsible for Git 1.0 release on 21 Dec 2005
• He remains as the project’s maintainer
• Linus on Git, Google Tech Talk: http://www.youtube.com/watch?v=4XpnKHJAok8
Git4G33ks
GEEK ACADEMY 2013
GEEK ACADEMY
2013
Problem#:How is the course structured?
• Scenario based: Problems & Solutions
GEEK ACADEMY
2013
Problem#:What is distributed SCM?
GEEK ACADEMY
2013
Centralized CSM
Centralized
Repository
Developer
Developer
Developer
GEEK ACADEMY
2013
Distributed CSM
Shared Repository
Developer
Developer
Developer
Local Repository
Local Repository
Local Repository
GEEK ACADEMY
2013
Problem#: Is Git Installed?
$ git --version
git version 1.8.3.1
GEEK ACADEMY
2013
Problem#: How to create a local repo?
$ git init
GEEK ACADEMY
2013
Problem#: How to clone a remote repo?
$ git clone git@github.com:<username>/git_training.git
$ ssh-keygen
goto https://github.com/schalermthai/git_training
fork IT!
GEEK ACADEMY
2013
Problem#: How to see history?
$ git log --oneline --graph
Note:
git config --global alias.tree "log --graph --decorate --oneline --abbrev-commit"
GEEK ACADEMY
2013
C3
HEAD
master
C1 C2
GEEK ACADEMY
2013
Problem3: How to make a commit?
$ git status
$ echo ‘hello world’ >> file1.txt
$ git status
$ git add file1.txt
$ git status
$ git commit -m “my first commit”
GEEK ACADEMY
2013
C4
HEAD
master
C2 C3C1
GEEK ACADEMY
2013
NOTE:
svn add != git add
GEEK ACADEMY
2013
INDEX (staging)
Working Directory
C4
HEAD
master
C2 C3C1
git add
git commit
GEEK ACADEMY
2013
Git diff
$ echo ‘how are you?’ >> file1.txt
$ git status
$ git diff
GEEK ACADEMY
2013
Git diff
$ git add file1.txt
$ git status
# Changes to be committed:# (use "git rm
--cached <file>..." to unstage)## new file:
file1.txt
GEEK ACADEMY
2013
Git INDEX
$ git diff
GEEK ACADEMY
2013
Git INDEX
$ git diff --cached
GEEK ACADEMY
2013
HEAD
INDEX (staging)
Working Directory
git add
git commit
git diff
git diff --cached
GEEK ACADEMY
2013
INDEX is a SNAPSHOT!
$ echo 'oops!forgot something' >> file1.txt
$ git status
GEEK ACADEMY
2013
INDEX is a SNAPSHOT!
$ echo 'oops!forgot something' >> file1.txt
$ git status
$ git diff
$ git commit -am “added file1”
GEEK ACADEMY
2013
C5
HEAD
master
C3 C4C2C1
GEEK ACADEMY
2013
Recap
• git add
• git commit
• git status
• git diff
• git checkout
• git reset
• git log
GIT BRANCHING
GEEK ACADEMY 2013
GEEK ACADEMY
2013
S
GIT BRANCHING
- GIT branching is super easy & lightweight
- Branching is just a ref (AKA. pointer)
- SVN Branching is very heavyweight.
- Heavy enough so you wouldn’t want to create a branch unless it’s
super necessary
GEEK ACADEMY
2013
Problem#: How to create a new branch?
$ git branch feature1
$ git branch
$ git checkout feature1
$ git branch
$ git tree
GEEK ACADEMY
2013
C5
HEAD
master
C3 C4
GEEK ACADEMY
2013
C5
HEAD
master
C3 C4
feature1
git branch feature1
GEEK ACADEMY
2013
C5
HEAD
master
C3 C4
feature1
git checkout feature1
GEEK ACADEMY
2013
Problem#: How to create a new branch and
switch to it?
$ git checkout -b feature2
$ git branch
GEEK ACADEMY
2013
Problem#: How to create a new branch
from a commit point?
$ git checkout -b feature3 HEAD~1
$ git tree --all
GEEK ACADEMY
2013
Makes 2 commits to feature2 branch and tag
it!
$ git checkout feature2
$ echo ‘1’ >> feature2.txt
$ git add feature2.txt
$ git commit -m “completed task 2.1”
$ echo ‘2’ >> feature2.txt
$ git commit -am “completed task 2.2”
$ git tree
GEEK ACADEMY
2013
C5
HEAD
master
C3 C4
C6 C7
feature2
GEEK ACADEMY
2013
Problem#: How to merge a branch?
$ git checkout master
$ git merge feature2
GEEK ACADEMY
2013
C5
HEAD
master
C3 C4
C6 C7
feature2
GEEK ACADEMY
2013
C5
HEAD
master
C3 C4 C6 C7
feature2
FAST FORWARDED!
GEEK ACADEMY
2013
Switch back to feature3 branch and create 1
new commit!
GEEK ACADEMY
2013
C5
HEAD
master
C3 C4 C6 C7
feature2
C8
feature3
GEEK ACADEMY
2013
Switch back to master and now try to merge
feature3 branch!
GEEK ACADEMY
2013
C5C3 C4
master
C6 C7
feature2
C8
feature3
C9
HEAD
Cannot make a fast-forward. So a new
merge commit is created
GEEK ACADEMY
2013
Problem#: How to reset a branch?
$ git checkout master
$ git reset --hard feature2
$ git tree
GEEK ACADEMY
2013
C5C3 C4
master
C6 C7
feature2
C8
feature3
HEAD
GEEK ACADEMY
2013
Problem#: How to delete a branch?
$ git checkout master
$ git branch -D feature2
$ git branch
$ git tree
GEEK ACADEMY
2013
C5C3 C4
master
C6 C7
feature2
C8
feature3
HEAD
GEEK ACADEMY
2013
C5C3 C4
master
C6 C7
C8
feature3
HEAD
GEEK ACADEMY
2013
Problem#: How to rebase a branch?
$ git checkout feature3
$ git rebase master
GEEK ACADEMY
2013
C5C3 C4
master
C6 C7
C8
feature3
HEAD
C8’
Challenge: switch back to master and fast-forward it to feature3
GEEK ACADEMY
2013
C5C3 C4
master
C6 C7
feature3
HEAD
C8’
GEEK ACADEMY
2013
C5C3 C4
master
C6 C7
feature3
HEAD
C8’
Conflict
resolving
GEEK ACADEMY 2013
GEEK ACADEMY
2013
Neither, Rebase or Merge did not make
conflicts go away!!
Git Remote
GEEK ACADEMY 2013
GEEK ACADEMY
2013
Problem#: How to see remote details?
$ git remote -v
$ git remote show <remote>
GEEK ACADEMY
2013
Problem#: How to see tracking remote
branches?
$ git branch -r
$ git branch -a
GEEK ACADEMY
2013
Problem#: How to push changes to a branch
$ git push origin master
GEEK ACADEMY
2013
Find a couple to work with!
GEEK ACADEMY
2013
1. A & B clone from same repo
2. A add feature1, commit and push; B add feature2, commit and push
3. A add feature3, commit and push;
3. A add feature3, commit and push;
3. A add feature3, commit and push;
GEEK ACADEMY
2013
Problem#: How to pull from remote?
$ git pull origin master
GEEK ACADEMY
2013
Git pull == git fetch;git merge origin/master
GEEK ACADEMY
2013
git tree --all
GEEK ACADEMY
2013
Git pull --rebase == git fetch;git rebase
origin/master
GEEK ACADEMY
2013
Problem#: How to diff with remote branch?
$ git fetch;
$ git diff origin/master
$ git diff ...origin/master
$ git diff ..origin/master
GEEK ACADEMY
2013
Problem#: You want to pull but you are not
ready to commit?
$ git reset --hard HEAD~1
$ echo ‘experiment an idea’ >> feature3.txt
$ cat feature3.txt
$ git status
$ git pull origin master
STASH to rescue
GEEK ACADEMY
2013
Problem#: How to stash changes?
$ git stash
$ git status
$ git pull origin master
$ git stash pop
Warning!: GIT STASH can create conflicts!
Tagging &
Branching Tips
GEEK ACADEMY 2013
GEEK ACADEMY
2013
Problem#: Git checkout vs Git reset?
$ git checkout <commit>
$ git reset <commit>
GEEK ACADEMY
2013
Problem#: What to do when you forgot to
create a feature branch?
$ git checkout master
$ touch feature6.txt
$ git add feature6.txt
$ git commit -m “complete feature6”
GEEK ACADEMY
2013
Problem#: What to do when you forgot to
create a feature branch?
$ git branch feature6
$ git tree --all
$ git reset --hard origin/master
$ git tree --all
GEEK ACADEMY
2013
Problem#: How to create a tag?
$ git tag v1.0
$ git tag v1.1 <commit>
$ git push origin v1.0
GEEK ACADEMY
2013
Problem#: How to push to different remote
branch name?
$ git checkout -b myFeature5
$ git push origin myFeature5:feature5
GEEK ACADEMY
2013
Problem#: How to delete a local branch?
$ git branch -D feature2
GEEK ACADEMY
2013
Problem#: How to delete a remote branch?
$ git push origin :feature2
GEEK ACADEMY
2013
Problem#: How to remove deleted tracking
branch?
$ git branch -a
$ git fetch
$ git prune
$ git fetch -p
UNDO
CHANGES
GEEK ACADEMY 2013
GEEK ACADEMY
2013
Problem#: How to revert a public commit?
$ git revert #commit
GEEK ACADEMY
2013
Problem#: How to amend to local last
commit?
$ echo ‘finish feature4’ >> feature4.txt
$ git add feature4.txt
$ git commit -m “complete feature4”
$ echo ‘forgot this’ >> feature4.txt
$ git add feature3-1.txt
$ git commit --amend
GEEK ACADEMY
2013
Problem#: How to do rebase interactive?
$ git rebase -i HEAD~4
#you can move, delete, edit, squash commits
Git for
debugging
GEEK ACADEMY 2013
GEEK ACADEMY
2013
Problem#: How to see who commit which line
of code and when?
$ git blame <file>
GEEK ACADEMY
2013
Problem#: How to see which revision that
introduce the bug?
$ git bisect start
$ git bisect bad
$ git bisect good v1.0
Git Submodule
GEEK ACADEMY 2013
GEEK ACADEMY
2013
Problem#: How to create a git submodule?
$ git submodule add <remote> <directory>
$ git status
$ git commit -m “added submodule”
Git Tips
GEEK ACADEMY 2013
GEEK ACADEMY
2013
Problem#: How to cherry-pick commits?
$ git cherry-pick <commit>
GEEK ACADEMY
2013
Problem#: How to remove untracked files?
$ git clean -df
GEEK ACADEMY
2013
Problem#: How to add new remote?
$ git remote add <alias> <remote>
$ git fetch <alias>
Git Workflow
GEEK ACADEMY 2013
GEEK ACADEMY
2013
Problem#: Git flow?
http://nvie.com/posts/a-successful-git-branch
https://github.com/nvie/gitflow
GEEK ACADEMY
2013
Problem#: Code review with
Github/BitBucket Pull Request
GEEK ACADEMY
2013
Problem#: Code review with Gerrit
GEEK ACADEMY
2013
Feature Branch vs Branch by Abstraction
• Feature Branch == Poor man’s modular architect
• Feature toggle + Branch by abstraction
• Feature branch suffers when two team members start working on two different feature branches for
too long. git rebase origin/develop every day wont help much
GEEK ACADEMY
2013
Summary
• Git is a very cool & powerful tool
• Once you understand its basic fundamental, you’ll start fall in love with its infinite potential
• Keep calm and geek on!
GEEK ACADEMY 2013

Weitere ähnliche Inhalte

Was ist angesagt?

Git and GitHub - The beginning
Git and GitHub - The beginning Git and GitHub - The beginning
Git and GitHub - The beginning Gemma Catolino
 
Introduction to Git (even for non-developers)
Introduction to Git (even for non-developers)Introduction to Git (even for non-developers)
Introduction to Git (even for non-developers)John Anderson
 
JBUG Netherlands Openshift Primer
JBUG Netherlands Openshift PrimerJBUG Netherlands Openshift Primer
JBUG Netherlands Openshift PrimerEric D. Schabell
 
Red Hat Developer Day London: Advanced Java & JBoss in the Cloud
Red Hat Developer Day London: Advanced Java & JBoss in the Cloud Red Hat Developer Day London: Advanced Java & JBoss in the Cloud
Red Hat Developer Day London: Advanced Java & JBoss in the Cloud Eric D. Schabell
 
LetSwift 2017 - 토스 iOS 앱의 개발/배포 환경
LetSwift 2017 - 토스 iOS 앱의 개발/배포 환경LetSwift 2017 - 토스 iOS 앱의 개발/배포 환경
LetSwift 2017 - 토스 iOS 앱의 개발/배포 환경Mintak Son
 
(Live) build and run golang web server on android.avi
(Live) build and run golang web server on android.avi(Live) build and run golang web server on android.avi
(Live) build and run golang web server on android.aviSeongJae Park
 
Android is going to Go! Android and Golang
Android is going to Go! Android and GolangAndroid is going to Go! Android and Golang
Android is going to Go! Android and GolangAlmog Baku
 
DO YOU WANT TO USE A VCS
DO YOU WANT TO USE A VCSDO YOU WANT TO USE A VCS
DO YOU WANT TO USE A VCSSeongJae Park
 
WebGeek AppNimbus (Nikko Bautista)
WebGeek AppNimbus (Nikko Bautista)WebGeek AppNimbus (Nikko Bautista)
WebGeek AppNimbus (Nikko Bautista)WebGeek Philippines
 
Let the contribution begin (EST futures)
Let the contribution begin  (EST futures)Let the contribution begin  (EST futures)
Let the contribution begin (EST futures)SeongJae Park
 
Enabling Microservices @Orbitz - DevOpsDays Chicago 2015
Enabling Microservices @Orbitz - DevOpsDays Chicago 2015Enabling Microservices @Orbitz - DevOpsDays Chicago 2015
Enabling Microservices @Orbitz - DevOpsDays Chicago 2015Steve Hoffman
 
Git the Docs: A fun, hands-on introduction to version control
Git the Docs: A fun, hands-on introduction to version controlGit the Docs: A fun, hands-on introduction to version control
Git the Docs: A fun, hands-on introduction to version controlBecky Todd
 
JAZOON'13 - Stefan Saasen - True Git: The Great Migration
JAZOON'13 - Stefan Saasen - True Git: The Great MigrationJAZOON'13 - Stefan Saasen - True Git: The Great Migration
JAZOON'13 - Stefan Saasen - True Git: The Great Migrationjazoon13
 
An introduction to_golang.avi
An introduction to_golang.aviAn introduction to_golang.avi
An introduction to_golang.aviSeongJae Park
 
Develop Android app using Golang
Develop Android app using GolangDevelop Android app using Golang
Develop Android app using GolangSeongJae Park
 

Was ist angesagt? (16)

Git and GitHub - The beginning
Git and GitHub - The beginning Git and GitHub - The beginning
Git and GitHub - The beginning
 
Introduction to Git (even for non-developers)
Introduction to Git (even for non-developers)Introduction to Git (even for non-developers)
Introduction to Git (even for non-developers)
 
JBUG Netherlands Openshift Primer
JBUG Netherlands Openshift PrimerJBUG Netherlands Openshift Primer
JBUG Netherlands Openshift Primer
 
Intro. to Git and Github
Intro. to Git and GithubIntro. to Git and Github
Intro. to Git and Github
 
Red Hat Developer Day London: Advanced Java & JBoss in the Cloud
Red Hat Developer Day London: Advanced Java & JBoss in the Cloud Red Hat Developer Day London: Advanced Java & JBoss in the Cloud
Red Hat Developer Day London: Advanced Java & JBoss in the Cloud
 
LetSwift 2017 - 토스 iOS 앱의 개발/배포 환경
LetSwift 2017 - 토스 iOS 앱의 개발/배포 환경LetSwift 2017 - 토스 iOS 앱의 개발/배포 환경
LetSwift 2017 - 토스 iOS 앱의 개발/배포 환경
 
(Live) build and run golang web server on android.avi
(Live) build and run golang web server on android.avi(Live) build and run golang web server on android.avi
(Live) build and run golang web server on android.avi
 
Android is going to Go! Android and Golang
Android is going to Go! Android and GolangAndroid is going to Go! Android and Golang
Android is going to Go! Android and Golang
 
DO YOU WANT TO USE A VCS
DO YOU WANT TO USE A VCSDO YOU WANT TO USE A VCS
DO YOU WANT TO USE A VCS
 
WebGeek AppNimbus (Nikko Bautista)
WebGeek AppNimbus (Nikko Bautista)WebGeek AppNimbus (Nikko Bautista)
WebGeek AppNimbus (Nikko Bautista)
 
Let the contribution begin (EST futures)
Let the contribution begin  (EST futures)Let the contribution begin  (EST futures)
Let the contribution begin (EST futures)
 
Enabling Microservices @Orbitz - DevOpsDays Chicago 2015
Enabling Microservices @Orbitz - DevOpsDays Chicago 2015Enabling Microservices @Orbitz - DevOpsDays Chicago 2015
Enabling Microservices @Orbitz - DevOpsDays Chicago 2015
 
Git the Docs: A fun, hands-on introduction to version control
Git the Docs: A fun, hands-on introduction to version controlGit the Docs: A fun, hands-on introduction to version control
Git the Docs: A fun, hands-on introduction to version control
 
JAZOON'13 - Stefan Saasen - True Git: The Great Migration
JAZOON'13 - Stefan Saasen - True Git: The Great MigrationJAZOON'13 - Stefan Saasen - True Git: The Great Migration
JAZOON'13 - Stefan Saasen - True Git: The Great Migration
 
An introduction to_golang.avi
An introduction to_golang.aviAn introduction to_golang.avi
An introduction to_golang.avi
 
Develop Android app using Golang
Develop Android app using GolangDevelop Android app using Golang
Develop Android app using Golang
 

Ähnlich wie Geek git

Git Distributed Version Control System
Git   Distributed Version Control SystemGit   Distributed Version Control System
Git Distributed Version Control SystemVictor Wong
 
JAZOON'13 - Thomas Hug & Bartosz Majsak - Git Workshop -Essentials
JAZOON'13 - Thomas Hug & Bartosz Majsak - Git Workshop -EssentialsJAZOON'13 - Thomas Hug & Bartosz Majsak - Git Workshop -Essentials
JAZOON'13 - Thomas Hug & Bartosz Majsak - Git Workshop -Essentialsjazoon13
 
Introduction To Git Workshop
Introduction To Git WorkshopIntroduction To Git Workshop
Introduction To Git Workshopthemystic_ca
 
Git: Why And How to
Git: Why And How toGit: Why And How to
Git: Why And How tolanhuonga3
 
Git workflows presentation
Git workflows presentationGit workflows presentation
Git workflows presentationMack Hardy
 
Git Started With Git
Git Started With GitGit Started With Git
Git Started With GitNick Quaranto
 
Getting some Git
Getting some GitGetting some Git
Getting some GitBADR
 
JAZOON'13 - Bartosz Majsak - Git Workshop - Kung Fu
JAZOON'13 - Bartosz Majsak - Git Workshop - Kung FuJAZOON'13 - Bartosz Majsak - Git Workshop - Kung Fu
JAZOON'13 - Bartosz Majsak - Git Workshop - Kung Fujazoon13
 
Nicola Iarocci - Git stories from the front line - Codemotion Milan 2017
Nicola Iarocci - Git stories from the front line - Codemotion Milan 2017Nicola Iarocci - Git stories from the front line - Codemotion Milan 2017
Nicola Iarocci - Git stories from the front line - Codemotion Milan 2017Codemotion
 
Git Anti-Patterns: How To Mess Up With Git and Love it Again
Git Anti-Patterns: How To Mess Up With Git and Love it AgainGit Anti-Patterns: How To Mess Up With Git and Love it Again
Git Anti-Patterns: How To Mess Up With Git and Love it AgainLemi Orhan Ergin
 
Working in Team using Git in Unity
Working in Team using Git in UnityWorking in Team using Git in Unity
Working in Team using Git in UnityRifauddin Tsalitsy
 
Get Good With Git
Get Good With GitGet Good With Git
Get Good With GitHoffman Lab
 

Ähnlich wie Geek git (20)

Git Distributed Version Control System
Git   Distributed Version Control SystemGit   Distributed Version Control System
Git Distributed Version Control System
 
Loading...git
Loading...gitLoading...git
Loading...git
 
JAZOON'13 - Thomas Hug & Bartosz Majsak - Git Workshop -Essentials
JAZOON'13 - Thomas Hug & Bartosz Majsak - Git Workshop -EssentialsJAZOON'13 - Thomas Hug & Bartosz Majsak - Git Workshop -Essentials
JAZOON'13 - Thomas Hug & Bartosz Majsak - Git Workshop -Essentials
 
Gittalk
GittalkGittalk
Gittalk
 
Introduction To Git Workshop
Introduction To Git WorkshopIntroduction To Git Workshop
Introduction To Git Workshop
 
Git basics
Git basicsGit basics
Git basics
 
Git: Why And How to
Git: Why And How toGit: Why And How to
Git: Why And How to
 
Git workflows presentation
Git workflows presentationGit workflows presentation
Git workflows presentation
 
Git Started With Git
Git Started With GitGit Started With Git
Git Started With Git
 
Git training
Git trainingGit training
Git training
 
Getting some Git
Getting some GitGetting some Git
Getting some Git
 
3 Git
3 Git3 Git
3 Git
 
JAZOON'13 - Bartosz Majsak - Git Workshop - Kung Fu
JAZOON'13 - Bartosz Majsak - Git Workshop - Kung FuJAZOON'13 - Bartosz Majsak - Git Workshop - Kung Fu
JAZOON'13 - Bartosz Majsak - Git Workshop - Kung Fu
 
Nicola Iarocci - Git stories from the front line - Codemotion Milan 2017
Nicola Iarocci - Git stories from the front line - Codemotion Milan 2017Nicola Iarocci - Git stories from the front line - Codemotion Milan 2017
Nicola Iarocci - Git stories from the front line - Codemotion Milan 2017
 
GIT from n00b
GIT from n00bGIT from n00b
GIT from n00b
 
Becoming a Git Master
Becoming a Git MasterBecoming a Git Master
Becoming a Git Master
 
Git Anti-Patterns: How To Mess Up With Git and Love it Again
Git Anti-Patterns: How To Mess Up With Git and Love it AgainGit Anti-Patterns: How To Mess Up With Git and Love it Again
Git Anti-Patterns: How To Mess Up With Git and Love it Again
 
Working in Team using Git in Unity
Working in Team using Git in UnityWorking in Team using Git in Unity
Working in Team using Git in Unity
 
git session --interactive
git session --interactivegit session --interactive
git session --interactive
 
Get Good With Git
Get Good With GitGet Good With Git
Get Good With Git
 

Kürzlich hochgeladen

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 

Kürzlich hochgeladen (20)

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 

Geek git

Hinweis der Redaktion

  1. - poll: who’s using what?- cvs- svn- sourcesafe- perforce- git- mercurial - bazzar- ใครใช้ dropbox?- ใครไม่ใช้อะไรเลย ??- เริ่มใช้กันมาตั้งแต่เมื่อไหร่ ?
  2. - BitKeeper - distributed commercial scm for open source projects.
  3. http://www.youtube.com/watch?v=4XpnKHJAok8
  4. $ git config --global user.name &quot;Salahuddin Chalermthai&quot;$ git config --global user.email [email_address] git config --global color.ui true
  5. git add to make the files trackable and prepare them for the next commit
  6. git add to make the files trackable and prepare them for the next commit
  7. Git add (to INDEX)
  8. git status; git diff diff is a diff between WT and INDEX? what does that mean is to be shown next.
  9. but diff shows NOTHING!?!
  10. but diff shows NOTHING!?!
  11. but diff shows NOTHING!?!
  12. git diff
  13. INDEX is a snapshot of time. # Changes to be committed :# (use &quot;git rm --cached &lt;file&gt;...&quot; to unstage)# # new file: file2.txt # Changes not staged for commit :# (use &quot;git add &lt;file&gt;...&quot; to update what will be committed)# (use &quot;git checkout -- &lt;file&gt;...&quot; to discard changes in working directory)# # modified: file2.txt # modified: file2.txt # modified: file2.txt # modified: file2.txt # modified: file2.txt
  14. INDEX is a snapshot of time. - try git diff again - readd and commit by using git commit -am # Changes to be committed :# (use &quot;git rm --cached &lt;file&gt;...&quot; to unstage)# # new file: file2.txt # Changes not staged for commit :# (use &quot;git add &lt;file&gt;...&quot; to update what will be committed)# (use &quot;git checkout -- &lt;file&gt;...&quot; to discard changes in working directory)# # modified: file2.txt # modified: file2.txt # modified: file2.txt # modified: file2.txt # modified: file2.txt
  15. git checkout, git reset have more to come!
  16. - Merging SVN branches is another hard topic
  17. git add to make the files trackable and prepare them for the next commit
  18. git add to make the files trackable and prepare them for the next commit
  19. HEAD~1 == head -1
  20. git checkout master git merge feature3 #input merge commit message &amp; save git tree
  21. What is rebase? rebase is to rewrite history.
  22. You still have to resolve it! clone [email_address] :schalermthai/git_training_with_conflicts.git and try resolve conflicts with both merge and rebase!
  23. origin is an default ALIAS
  24. check git hub
  25. setup a new git repo. Add github collaborator as necessary
  26. B and A will have to pull first before push
  27. origin is an default ALIAS
  28. setup a new git repo. Add github collaborator as necessary
  29. setup a new git repo. Add github collaborator as necessary
  30. setup a new git repo. Add github collaborator as necessary
  31. $ git diff remote/origin This shows the incoming remote changes as deletions; any commits in your local repository are shown as additions. $ git diff ...remote/origin Shows incoming remote changes as additions; the triple-dot excludes changes committed to your local repository. $ git diff ..remote/origin Shows incoming remote changes as additions; the double-dot includes changes committed to your local repository as deletions (since they are not yet pushed).
  32. You can’t PULL and you aren’t ready to commit! STASH to rescue
  33. Warning!: GIT STASH can create conflicts!
  34. Warning!: GIT STASH can create conflicts!
  35. Warning!: GIT STASH can create conflicts!
  36. Warning!: GIT STASH can create conflicts!
  37. Warning!: GIT STASH can create conflicts!
  38. Warning!: GIT STASH can create conflicts!
  39. Warning!: GIT STASH can create conflicts!
  40. Warning!: GIT STASH can create conflicts!
  41. A friend deleted a branch you used to hold reference
  42. like rebase: LOCAL changes only
  43. http://git-scm.com/book/en/Git-Tools-Rewriting-History
  44. git blame -C -L 0,4 feature3.txt
  45. BINARY SEARCH! http://stackoverflow.com/questions/4713088/how-to-use-git-bisect
  46. http://git-scm.com/book/en/Git-Tools-Debugging-with-Git
  47. When to use submodules!
  48. http://git-scm.com/book/en/Git-Tools-Debugging-with-Git
  49. http://git-scm.com/book/en/Git-Tools-Debugging-with-Git
  50. http://code.google.com/p/gerrit/ https://review.openstack.org/Documentation/intro-quick.html