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
 
GitSetupLinux
GitSetupLinuxGitSetupLinux
GitSetupLinux
 
Git setuplinux
Git setuplinuxGit setuplinux
Git setuplinux
 
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

How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 

Último (20)

How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 

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