SlideShare uma empresa Scribd logo
1 de 31
Git Basic Browny 2010.12.06
Outline Introduction to Git Install Git Basic Commands Git Branch Git and Dropbox Resources
rcs
Centralized Version Control System (CVCS) ,[object Object]
 Subversion
 Perforce
 etc…,[object Object]
 Mercurial
 Bazaar
 etc…,[object Object]
Flow
Outline Introduction to Git Install Git Basic Commands Git Branch Git and Dropbox Resources
Install Git on Windows msysgit - http://code.google.com/p/msysgit/
Initialization 設定 ID 和 Email 	$ gitconfig --global user.name “browny"  	$ gitconfig --global user.emailbrowny@gmail.com 查看設定資料 	$ gitconfig --list
Outline Introduction to Git Install Git Basic Commands Git Branch Git and Dropbox Resources
Basic Commands (1) 初始化一個 git倉庫 $ git init 將檔案放入暫存夾等候 commit $ git add 指定要忽略 commit 的檔案 (create a file in your repo named .gitignore) *.[oa]:忽略所有 .o 和 .a 檔案 *~ :忽略所有 ~ 檔案
Basic Commands (2) 觀看狀態 $ git status 提交  $ git commit 幫某次 commit 加上含附註的標籤 tag $ git tag –a v1.1 –m ‘version 1.1’ 觀看提交歷程 $ git log
Basic Commands (3) 複製遠端 repo. $ git clone git://github.com/schacon/grit.git 自定義複製來的 repo. 名稱 $ git clone git://github.com/schacon/grit.git mygrit
Basic Commands (4) 查看現有的分支 	$ git branch                建立新的分支 	$ git branch 分支名稱 切換到主幹上 	$ git checkout master  切換到某個分支上 git checkout 分支名稱
Outline Introduction to Git Install Git Basic Commands Git Branch Git and Dropbox Resources
First Commit
Multiple Commit
master
Make a branch $ git branch testing
Re-direct HEAD $ git checkout testing
Commit on testing
Back to master $ git checkout master
Commit on master
Outline Introduction to Git Install Git Basic Commands Git Branch Git and Dropbox Resources
Dropbox Setting
Set up cloud repo. Make a directory in Dropbox $ mkdir /GitRepo/opencv-gradient.git 	$ cd /GitRepo/opencv-gradient.git Initialize it  $ git init --bare

Mais conteúdo relacionado

Mais procurados

The myths of deprecating docker in kubernetes
The myths of deprecating docker in kubernetesThe myths of deprecating docker in kubernetes
The myths of deprecating docker in kubernetesJo Hoon
 
Great Hiroshima with Python 170830
Great Hiroshima with Python 170830Great Hiroshima with Python 170830
Great Hiroshima with Python 170830Takuya Nishimoto
 
Introduction to node js
Introduction to node jsIntroduction to node js
Introduction to node jsAmit Thakkar
 
Brainly git basics workshop
Brainly git basics workshopBrainly git basics workshop
Brainly git basics workshopŁukasz Lalik
 
Introduction to zc.buildout
Introduction to zc.buildoutIntroduction to zc.buildout
Introduction to zc.buildoutRicardo Newbery
 
Camlistore reprise at Google NYC
Camlistore reprise at Google NYCCamlistore reprise at Google NYC
Camlistore reprise at Google NYCclive boulton
 
New kid on the block node.js
New kid on the block node.jsNew kid on the block node.js
New kid on the block node.jsJoel Divekar
 
Beginner's guide to drizzle
Beginner's guide to drizzleBeginner's guide to drizzle
Beginner's guide to drizzleAndrew Hutchings
 
Openwrt frontend backend
Openwrt frontend backendOpenwrt frontend backend
Openwrt frontend backend晓东 杜
 
REST Web Sebvice
REST Web SebviceREST Web Sebvice
REST Web Sebvicekhmerforge
 

Mais procurados (14)

Magie di git
Magie di gitMagie di git
Magie di git
 
The myths of deprecating docker in kubernetes
The myths of deprecating docker in kubernetesThe myths of deprecating docker in kubernetes
The myths of deprecating docker in kubernetes
 
How to Contribute to GStreamer
How to Contribute to GStreamerHow to Contribute to GStreamer
How to Contribute to GStreamer
 
Great Hiroshima with Python 170830
Great Hiroshima with Python 170830Great Hiroshima with Python 170830
Great Hiroshima with Python 170830
 
Introduction to node js
Introduction to node jsIntroduction to node js
Introduction to node js
 
Brainly git basics workshop
Brainly git basics workshopBrainly git basics workshop
Brainly git basics workshop
 
Introduction to zc.buildout
Introduction to zc.buildoutIntroduction to zc.buildout
Introduction to zc.buildout
 
Camlistore reprise at Google NYC
Camlistore reprise at Google NYCCamlistore reprise at Google NYC
Camlistore reprise at Google NYC
 
New kid on the block node.js
New kid on the block node.jsNew kid on the block node.js
New kid on the block node.js
 
Beginner's guide to drizzle
Beginner's guide to drizzleBeginner's guide to drizzle
Beginner's guide to drizzle
 
Docker
DockerDocker
Docker
 
Openwrt frontend backend
Openwrt frontend backendOpenwrt frontend backend
Openwrt frontend backend
 
Git operation 101
Git operation 101Git operation 101
Git operation 101
 
REST Web Sebvice
REST Web SebviceREST Web Sebvice
REST Web Sebvice
 

Destaque

Git tutorial git branches 20131206-Bryan
Git tutorial   git branches 20131206-BryanGit tutorial   git branches 20131206-Bryan
Git tutorial git branches 20131206-BryanLearningTech
 
Nitin resume dev_ops
Nitin resume dev_opsNitin resume dev_ops
Nitin resume dev_opsNitin Kolla
 
Release build engineer j2ee focused
Release build engineer   j2ee focusedRelease build engineer   j2ee focused
Release build engineer j2ee focusedLuke Singleton
 
Santhosh build and release (1)
Santhosh build and release (1)Santhosh build and release (1)
Santhosh build and release (1)Santhosh Dodda
 
Khaleel Devops Resume (2)
Khaleel Devops Resume (2)Khaleel Devops Resume (2)
Khaleel Devops Resume (2)khaleel a
 
Vighnesh_Naik_Resume_DevOps
Vighnesh_Naik_Resume_DevOpsVighnesh_Naik_Resume_DevOps
Vighnesh_Naik_Resume_DevOpsVIGHNESH NAIK
 

Destaque (10)

Branch model in Git
Branch model in GitBranch model in Git
Branch model in Git
 
Git tutorial git branches 20131206-Bryan
Git tutorial   git branches 20131206-BryanGit tutorial   git branches 20131206-Bryan
Git tutorial git branches 20131206-Bryan
 
sahithi_Build_Release_Resume
sahithi_Build_Release_Resumesahithi_Build_Release_Resume
sahithi_Build_Release_Resume
 
Nitin resume dev_ops
Nitin resume dev_opsNitin resume dev_ops
Nitin resume dev_ops
 
Release build engineer j2ee focused
Release build engineer   j2ee focusedRelease build engineer   j2ee focused
Release build engineer j2ee focused
 
Santhosh build and release (1)
Santhosh build and release (1)Santhosh build and release (1)
Santhosh build and release (1)
 
Khaleel Devops Resume (2)
Khaleel Devops Resume (2)Khaleel Devops Resume (2)
Khaleel Devops Resume (2)
 
Dev ops engineer
Dev ops engineerDev ops engineer
Dev ops engineer
 
Vighnesh_Naik_Resume_DevOps
Vighnesh_Naik_Resume_DevOpsVighnesh_Naik_Resume_DevOps
Vighnesh_Naik_Resume_DevOps
 
Git vol 2
Git vol 2Git vol 2
Git vol 2
 

Semelhante a Git basic

Semelhante a Git basic (20)

Introduction to git
Introduction to gitIntroduction to git
Introduction to git
 
GTFO: Git Theory For OpenSource
GTFO: Git Theory For OpenSourceGTFO: Git Theory For OpenSource
GTFO: Git Theory For OpenSource
 
Git basic and workflow
Git basic and workflowGit basic and workflow
Git basic and workflow
 
Git training
Git trainingGit training
Git training
 
Git
GitGit
Git
 
Wokshop de Git
Wokshop de Git Wokshop de Git
Wokshop de Git
 
Git cheat-sheets
Git cheat-sheetsGit cheat-sheets
Git cheat-sheets
 
Git setuplinux
Git setuplinuxGit setuplinux
Git setuplinux
 
GitSetupLinux
GitSetupLinuxGitSetupLinux
GitSetupLinux
 
Learning Basic GIT Cmd
Learning Basic GIT CmdLearning Basic GIT Cmd
Learning Basic GIT Cmd
 
簡單介紹git
簡單介紹git簡單介紹git
簡單介紹git
 
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
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
 
Git introduction
Git introductionGit introduction
Git introduction
 
Introduction to GIT
Introduction to GITIntroduction to GIT
Introduction to GIT
 
GIT 101
GIT 101GIT 101
GIT 101
 
Git Workshop : Getting Started
Git Workshop : Getting StartedGit Workshop : Getting Started
Git Workshop : Getting Started
 
Hacktoberfest intro to Git and GitHub
Hacktoberfest intro to Git and GitHubHacktoberfest intro to Git and GitHub
Hacktoberfest intro to Git and GitHub
 
Git
GitGit
Git
 
Git
GitGit
Git
 

Mais de Shih-Hsiang Lin

Introduction to Apache Ant
Introduction to Apache AntIntroduction to Apache Ant
Introduction to Apache AntShih-Hsiang Lin
 
Introduction to GNU Make Programming Language
Introduction to GNU Make Programming LanguageIntroduction to GNU Make Programming Language
Introduction to GNU Make Programming LanguageShih-Hsiang Lin
 
Ch6 file, saving states, and preferences
Ch6 file, saving states, and preferencesCh6 file, saving states, and preferences
Ch6 file, saving states, and preferencesShih-Hsiang Lin
 
[C++ gui programming with qt4] chap9
[C++ gui programming with qt4] chap9[C++ gui programming with qt4] chap9
[C++ gui programming with qt4] chap9Shih-Hsiang Lin
 
Ch5 intent broadcast receivers adapters and internet
Ch5 intent broadcast receivers adapters and internetCh5 intent broadcast receivers adapters and internet
Ch5 intent broadcast receivers adapters and internetShih-Hsiang Lin
 
Ch4 creating user interfaces
Ch4 creating user interfacesCh4 creating user interfaces
Ch4 creating user interfacesShih-Hsiang Lin
 
Ch3 creating application and activities
Ch3 creating application and activitiesCh3 creating application and activities
Ch3 creating application and activitiesShih-Hsiang Lin
 
[C++ GUI Programming with Qt4] chap7
[C++ GUI Programming with Qt4] chap7[C++ GUI Programming with Qt4] chap7
[C++ GUI Programming with Qt4] chap7Shih-Hsiang Lin
 
[C++ GUI Programming with Qt4] chap4
[C++ GUI Programming with Qt4] chap4[C++ GUI Programming with Qt4] chap4
[C++ GUI Programming with Qt4] chap4Shih-Hsiang Lin
 
Introduction to homography
Introduction to homographyIntroduction to homography
Introduction to homographyShih-Hsiang Lin
 
Project Hosting by Google
Project Hosting by GoogleProject Hosting by Google
Project Hosting by GoogleShih-Hsiang Lin
 
An Introduction to Hidden Markov Model
An Introduction to Hidden Markov ModelAn Introduction to Hidden Markov Model
An Introduction to Hidden Markov ModelShih-Hsiang Lin
 

Mais de Shih-Hsiang Lin (13)

Introduction to Apache Ant
Introduction to Apache AntIntroduction to Apache Ant
Introduction to Apache Ant
 
Introduction to GNU Make Programming Language
Introduction to GNU Make Programming LanguageIntroduction to GNU Make Programming Language
Introduction to GNU Make Programming Language
 
Ch6 file, saving states, and preferences
Ch6 file, saving states, and preferencesCh6 file, saving states, and preferences
Ch6 file, saving states, and preferences
 
[C++ gui programming with qt4] chap9
[C++ gui programming with qt4] chap9[C++ gui programming with qt4] chap9
[C++ gui programming with qt4] chap9
 
Ch5 intent broadcast receivers adapters and internet
Ch5 intent broadcast receivers adapters and internetCh5 intent broadcast receivers adapters and internet
Ch5 intent broadcast receivers adapters and internet
 
Ch4 creating user interfaces
Ch4 creating user interfacesCh4 creating user interfaces
Ch4 creating user interfaces
 
Ch3 creating application and activities
Ch3 creating application and activitiesCh3 creating application and activities
Ch3 creating application and activities
 
[C++ GUI Programming with Qt4] chap7
[C++ GUI Programming with Qt4] chap7[C++ GUI Programming with Qt4] chap7
[C++ GUI Programming with Qt4] chap7
 
[C++ GUI Programming with Qt4] chap4
[C++ GUI Programming with Qt4] chap4[C++ GUI Programming with Qt4] chap4
[C++ GUI Programming with Qt4] chap4
 
Function pointer
Function pointerFunction pointer
Function pointer
 
Introduction to homography
Introduction to homographyIntroduction to homography
Introduction to homography
 
Project Hosting by Google
Project Hosting by GoogleProject Hosting by Google
Project Hosting by Google
 
An Introduction to Hidden Markov Model
An Introduction to Hidden Markov ModelAn Introduction to Hidden Markov Model
An Introduction to Hidden Markov Model
 

Último

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
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
[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
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
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
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 

Último (20)

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
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 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
 
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...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
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
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

Git basic

  • 1. Git Basic Browny 2010.12.06
  • 2. Outline Introduction to Git Install Git Basic Commands Git Branch Git and Dropbox Resources
  • 3. rcs
  • 4.
  • 7.
  • 10.
  • 11. Flow
  • 12. Outline Introduction to Git Install Git Basic Commands Git Branch Git and Dropbox Resources
  • 13. Install Git on Windows msysgit - http://code.google.com/p/msysgit/
  • 14. Initialization 設定 ID 和 Email $ gitconfig --global user.name “browny" $ gitconfig --global user.emailbrowny@gmail.com 查看設定資料 $ gitconfig --list
  • 15. Outline Introduction to Git Install Git Basic Commands Git Branch Git and Dropbox Resources
  • 16. Basic Commands (1) 初始化一個 git倉庫 $ git init 將檔案放入暫存夾等候 commit $ git add 指定要忽略 commit 的檔案 (create a file in your repo named .gitignore) *.[oa]:忽略所有 .o 和 .a 檔案 *~ :忽略所有 ~ 檔案
  • 17. Basic Commands (2) 觀看狀態 $ git status 提交 $ git commit 幫某次 commit 加上含附註的標籤 tag $ git tag –a v1.1 –m ‘version 1.1’ 觀看提交歷程 $ git log
  • 18. Basic Commands (3) 複製遠端 repo. $ git clone git://github.com/schacon/grit.git 自定義複製來的 repo. 名稱 $ git clone git://github.com/schacon/grit.git mygrit
  • 19. Basic Commands (4) 查看現有的分支 $ git branch                建立新的分支 $ git branch 分支名稱 切換到主幹上 $ git checkout master  切換到某個分支上 git checkout 分支名稱
  • 20. Outline Introduction to Git Install Git Basic Commands Git Branch Git and Dropbox Resources
  • 24. Make a branch $ git branch testing
  • 25. Re-direct HEAD $ git checkout testing
  • 27. Back to master $ git checkout master
  • 29. Outline Introduction to Git Install Git Basic Commands Git Branch Git and Dropbox Resources
  • 31. Set up cloud repo. Make a directory in Dropbox $ mkdir /GitRepo/opencv-gradient.git $ cd /GitRepo/opencv-gradient.git Initialize it $ git init --bare
  • 32. Push repo. to Cloud Go to your work directory $ cd /EclipseWork/opencv-gradient Add a remote alias (git remote add aliasURI) $ git remote add drop-opencv-gradientfile:///C:/Documents%20and%20Settings/....../GitRepo/opencv-gradient.git Push working repo. to Dropbox repo. $ git push drop-opencv-gradient master
  • 33. Get repo. from Cloud git clone URIdirectoryName $ git clone file:///C:/Documents%20and%20Settings/....../GitRepo/opencv-gradient.gitopencv-gradient
  • 34.
  • 35. Resources Git - http://git-scm.com/ Pro Git簡體翻譯 - http://progit.org/book/zh/ Git初學文件整理 | Tsung's Blog - http://plog.longwin.com.tw/my_note-unix/2009/05/14/git-learn-initial-document-2009