SlideShare a Scribd company logo
Git Command
Jason
git work
index.html git index repository
git add index.html git commit ….
git config
Config file location: system、global、local
git config --global user.name "your name"
git config --global user.email "xxx@gmail.com"
git init
This command creates an empty Git repository - basically a .git directory with
subdirectories for objects, refs/heads, refs/tags, and template files. An initial
HEAD file that references the HEAD of the master branch is also created.
git status
Displays paths that have differences between the index file and the current HEAD
commit, paths that have differences between the working tree and the index file,
and paths in the working tree that are not tracked by Git
git add
This command updates the index using the current content found in the working
tree, to prepare the content staged for the next commit.
git add index.html index.css
git add .
git add --update
.gitignore file
A gitignore file specifies intentionally untracked files that Git should ignore. Files
already tracked by Git are not affected;
.gitignore content
*.css
!*.min.css
abc/*.txt
**/foo/bar
a/**/b
git reset
Reset current HEAD to the specified state
git reset
git reset index.html
git commit
Stores the current contents of the index in a new commit along with a log
message from the user describing the changes
git commit -m "commit message"
git commit --amend
git log
Shows the commit logs
git log
git log --stat
git log index.html
git log --author=’user name’
git command
git init
git config
git add
git reset
git commit
git log
git branch
git checkout
git merge
Basic Branching and Merging ( 1 / 8 )
Basic Branching and Merging ( 2 / 8 )
$ git branch iss53
$ git checkout iss53
Switched to a new branch 'iss53'
equivalent to
$ git checkout -b iss53
Switched to a new branch 'iss53'
Basic Branching and Merging ( 3 / 8 )
$ vim index.html
$ git commit -a -m 'added a new footer [issue 53]'
Basic Branching and Merging ( 4 / 8 )
$ git checkout master
Switched to branch 'master'
$ git checkout -b hotfix
Switched to a new branch 'hotfix'
$ vim index.html
$ git commit -a -m 'fixed the broken email address'
Basic Branching and Merging ( 5 / 8 )
$ git checkout master
$ git merge hotfix
Updating f42c576..3a0874c
Fast-forward
README | 1 -
1 file changed, 1 deletion(-)
Basic Branching and Merging ( 6 / 8 )
$ git branch -d hotfix
Deleted branch hotfix (was 3a0874c).
$ git checkout iss53
Switched to branch 'iss53'
$ vim index.html
$ git commit -a -m 'finished the new footer [issue 53]'
Basic Branching and Merging ( 7 / 8 )
$ git checkout master
$ git merge iss53
Auto-merging README
Merge made by the 'recursive' strategy.
README | 1 +
1 file changed, 1 insertion(+)
Basic Branching and Merging ( 8 / 8 )
$ git checkout master
$ git merge iss53
Auto-merging README
Merge made by the 'recursive' strategy.
README | 1 +
1 file changed, 1 insertion(+)
Reference
https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging
git command
git init
git config
git add
git reset
git commit
git log
git branch
git checkout
git merge
git rebase
git revert
gif diff

More Related Content

Similar to git command

Git session Dropsolid.com
Git session Dropsolid.comGit session Dropsolid.com
Git session Dropsolid.com
dropsolid
 
Git and github 101
Git and github 101Git and github 101
Git and github 101
Senthilkumar Gopal
 
Hacktoberfest intro to Git and GitHub
Hacktoberfest intro to Git and GitHubHacktoberfest intro to Git and GitHub
Hacktoberfest intro to Git and GitHub
DSC GVP
 
Git slides
Git slidesGit slides
Git slides
Nanyak S
 
Git basic
Git basicGit basic
Git basic
Akbar Uddin
 
Git
GitGit
git - the basics
git - the basicsgit - the basics
git - the basics
Arnelle Balane
 
Introduction To Git Workshop
Introduction To Git WorkshopIntroduction To Git Workshop
Introduction To Git Workshop
themystic_ca
 
Introduction to git
Introduction to gitIntroduction to git
Introduction to git
Aleksey Asiutin
 
Git - Version Control System
Git - Version Control SystemGit - Version Control System
Git - Version Control System
Namig Hajiyev
 
Introducción a git y GitHub
Introducción a git y GitHubIntroducción a git y GitHub
Introducción a git y GitHub
Lucas Videla
 
Version Control & Git
Version Control & GitVersion Control & Git
Version Control & Git
Jason Byrne
 
Git Basics (Professionals)
 Git Basics (Professionals) Git Basics (Professionals)
Git Basics (Professionals)
bryanbibat
 
Git Developer Cheatsheet
Git Developer CheatsheetGit Developer Cheatsheet
Git Developer CheatsheetAbdul Basit
 
Git cheat sheet with diagram-5.pdf
Git cheat sheet with diagram-5.pdfGit cheat sheet with diagram-5.pdf
Git cheat sheet with diagram-5.pdf
NiranjanKumarGanjiku1
 
390a gitintro 12au
390a gitintro 12au390a gitintro 12au
390a gitintro 12au
Nguyen Van Hung
 
Git github
Git githubGit github
Git github
Anurag Deb
 
Git internals
Git internalsGit internals
Git internals
Haggai Philip Zagury
 
The everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitThe everyday developer's guide to version control with Git
The everyday developer's guide to version control with Git
E Carter
 

Similar to git command (20)

Git session Dropsolid.com
Git session Dropsolid.comGit session Dropsolid.com
Git session Dropsolid.com
 
Git and github 101
Git and github 101Git and github 101
Git and github 101
 
Hacktoberfest intro to Git and GitHub
Hacktoberfest intro to Git and GitHubHacktoberfest intro to Git and GitHub
Hacktoberfest intro to Git and GitHub
 
GitSetupLinux
GitSetupLinuxGitSetupLinux
GitSetupLinux
 
Git slides
Git slidesGit slides
Git slides
 
Git basic
Git basicGit basic
Git basic
 
Git
GitGit
Git
 
git - the basics
git - the basicsgit - the basics
git - the basics
 
Introduction To Git Workshop
Introduction To Git WorkshopIntroduction To Git Workshop
Introduction To Git Workshop
 
Introduction to git
Introduction to gitIntroduction to git
Introduction to git
 
Git - Version Control System
Git - Version Control SystemGit - Version Control System
Git - Version Control System
 
Introducción a git y GitHub
Introducción a git y GitHubIntroducción a git y GitHub
Introducción a git y GitHub
 
Version Control & Git
Version Control & GitVersion Control & Git
Version Control & Git
 
Git Basics (Professionals)
 Git Basics (Professionals) Git Basics (Professionals)
Git Basics (Professionals)
 
Git Developer Cheatsheet
Git Developer CheatsheetGit Developer Cheatsheet
Git Developer Cheatsheet
 
Git cheat sheet with diagram-5.pdf
Git cheat sheet with diagram-5.pdfGit cheat sheet with diagram-5.pdf
Git cheat sheet with diagram-5.pdf
 
390a gitintro 12au
390a gitintro 12au390a gitintro 12au
390a gitintro 12au
 
Git github
Git githubGit github
Git github
 
Git internals
Git internalsGit internals
Git internals
 
The everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitThe everyday developer's guide to version control with Git
The everyday developer's guide to version control with Git
 

More from LearningTech

vim
vimvim
PostCss
PostCssPostCss
PostCss
LearningTech
 
ReactJs
ReactJsReactJs
ReactJs
LearningTech
 
Docker
DockerDocker
Docker
LearningTech
 
Semantic ui
Semantic uiSemantic ui
Semantic ui
LearningTech
 
node.js errors
node.js errorsnode.js errors
node.js errors
LearningTech
 
Process control nodejs
Process control nodejsProcess control nodejs
Process control nodejs
LearningTech
 
Expression tree
Expression treeExpression tree
Expression tree
LearningTech
 
SQL 效能調校
SQL 效能調校SQL 效能調校
SQL 效能調校
LearningTech
 
flexbox report
flexbox reportflexbox report
flexbox report
LearningTech
 
Vic weekly learning_20160504
Vic weekly learning_20160504Vic weekly learning_20160504
Vic weekly learning_20160504
LearningTech
 
Reflection & activator
Reflection & activatorReflection & activator
Reflection & activator
LearningTech
 
Peggy markdown
Peggy markdownPeggy markdown
Peggy markdown
LearningTech
 
Node child process
Node child processNode child process
Node child process
LearningTech
 
20160415ken.lee
20160415ken.lee20160415ken.lee
20160415ken.lee
LearningTech
 
Peggy elasticsearch應用
Peggy elasticsearch應用Peggy elasticsearch應用
Peggy elasticsearch應用
LearningTech
 
Expression tree
Expression treeExpression tree
Expression tree
LearningTech
 
Vic weekly learning_20160325
Vic weekly learning_20160325Vic weekly learning_20160325
Vic weekly learning_20160325
LearningTech
 
D3js learning tips
D3js learning tipsD3js learning tips
D3js learning tips
LearningTech
 
Asp.net MVC DI
Asp.net MVC DIAsp.net MVC DI
Asp.net MVC DI
LearningTech
 

More from LearningTech (20)

vim
vimvim
vim
 
PostCss
PostCssPostCss
PostCss
 
ReactJs
ReactJsReactJs
ReactJs
 
Docker
DockerDocker
Docker
 
Semantic ui
Semantic uiSemantic ui
Semantic ui
 
node.js errors
node.js errorsnode.js errors
node.js errors
 
Process control nodejs
Process control nodejsProcess control nodejs
Process control nodejs
 
Expression tree
Expression treeExpression tree
Expression tree
 
SQL 效能調校
SQL 效能調校SQL 效能調校
SQL 效能調校
 
flexbox report
flexbox reportflexbox report
flexbox report
 
Vic weekly learning_20160504
Vic weekly learning_20160504Vic weekly learning_20160504
Vic weekly learning_20160504
 
Reflection & activator
Reflection & activatorReflection & activator
Reflection & activator
 
Peggy markdown
Peggy markdownPeggy markdown
Peggy markdown
 
Node child process
Node child processNode child process
Node child process
 
20160415ken.lee
20160415ken.lee20160415ken.lee
20160415ken.lee
 
Peggy elasticsearch應用
Peggy elasticsearch應用Peggy elasticsearch應用
Peggy elasticsearch應用
 
Expression tree
Expression treeExpression tree
Expression tree
 
Vic weekly learning_20160325
Vic weekly learning_20160325Vic weekly learning_20160325
Vic weekly learning_20160325
 
D3js learning tips
D3js learning tipsD3js learning tips
D3js learning tips
 
Asp.net MVC DI
Asp.net MVC DIAsp.net MVC DI
Asp.net MVC DI
 

Recently uploaded

GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 

Recently uploaded (20)

GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 

git command

  • 2. git work index.html git index repository git add index.html git commit ….
  • 3. git config Config file location: system、global、local git config --global user.name "your name" git config --global user.email "xxx@gmail.com"
  • 4. git init This command creates an empty Git repository - basically a .git directory with subdirectories for objects, refs/heads, refs/tags, and template files. An initial HEAD file that references the HEAD of the master branch is also created.
  • 5. git status Displays paths that have differences between the index file and the current HEAD commit, paths that have differences between the working tree and the index file, and paths in the working tree that are not tracked by Git
  • 6. git add This command updates the index using the current content found in the working tree, to prepare the content staged for the next commit. git add index.html index.css git add . git add --update
  • 7. .gitignore file A gitignore file specifies intentionally untracked files that Git should ignore. Files already tracked by Git are not affected; .gitignore content *.css !*.min.css abc/*.txt **/foo/bar a/**/b
  • 8. git reset Reset current HEAD to the specified state git reset git reset index.html
  • 9. git commit Stores the current contents of the index in a new commit along with a log message from the user describing the changes git commit -m "commit message" git commit --amend
  • 10. git log Shows the commit logs git log git log --stat git log index.html git log --author=’user name’
  • 11. git command git init git config git add git reset git commit git log git branch git checkout git merge
  • 12. Basic Branching and Merging ( 1 / 8 )
  • 13. Basic Branching and Merging ( 2 / 8 ) $ git branch iss53 $ git checkout iss53 Switched to a new branch 'iss53' equivalent to $ git checkout -b iss53 Switched to a new branch 'iss53'
  • 14. Basic Branching and Merging ( 3 / 8 ) $ vim index.html $ git commit -a -m 'added a new footer [issue 53]'
  • 15. Basic Branching and Merging ( 4 / 8 ) $ git checkout master Switched to branch 'master' $ git checkout -b hotfix Switched to a new branch 'hotfix' $ vim index.html $ git commit -a -m 'fixed the broken email address'
  • 16. Basic Branching and Merging ( 5 / 8 ) $ git checkout master $ git merge hotfix Updating f42c576..3a0874c Fast-forward README | 1 - 1 file changed, 1 deletion(-)
  • 17. Basic Branching and Merging ( 6 / 8 ) $ git branch -d hotfix Deleted branch hotfix (was 3a0874c). $ git checkout iss53 Switched to branch 'iss53' $ vim index.html $ git commit -a -m 'finished the new footer [issue 53]'
  • 18. Basic Branching and Merging ( 7 / 8 ) $ git checkout master $ git merge iss53 Auto-merging README Merge made by the 'recursive' strategy. README | 1 + 1 file changed, 1 insertion(+)
  • 19. Basic Branching and Merging ( 8 / 8 ) $ git checkout master $ git merge iss53 Auto-merging README Merge made by the 'recursive' strategy. README | 1 + 1 file changed, 1 insertion(+)
  • 21. git command git init git config git add git reset git commit git log git branch git checkout git merge git rebase git revert gif diff

Editor's Notes

  1. working tree index : stage、 cache repository
  2. 注意! 當時的檔案內容會加入 git 索引,如果後來有修改資料,新的檔案是不會在 git 索引裡,需要再一次 git add