Your SlideShare is downloading. ×
  • Like
Git basic
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Git basic

  • 539 views
Published

 

Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
539
On SlideShare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
8
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Git Basic
    Browny
    2010.12.06
  • 2. Outline
    Version Control System (VCS)
    Introduction to Git
    Install Git
    Basic Commands
    Git Branch
    Resources
  • 3. rcs
  • 4. Centralized Version Control System (CVCS)
  • Distributed Version Control System (DVCS)
  • Snapshot, not Differences
    CVS
    Git
  • 11. Flow
  • 12. Install Git on Windows
    msysgit - http://code.google.com/p/msysgit/
  • 13. Initialization
    設定 ID 和 Email
    $ gitconfig --global user.name “browny"
    $ gitconfig --global user.emailbrowny@gmail.com
    查看設定資料
    $ gitconfig --list
  • 14. Basic Commands (1)
    初始化一個 git倉庫
    $ git init
    將檔案放入暫存夾等候 commit
    $ git add
    指定要忽略 commit 的檔案 (create a file in your repo named .gitignore)
    *.[oa]:忽略所有 .o 和 .a 檔案
    *~ :忽略所有 ~ 檔案
  • 15. Basic Commands (2)
    觀看狀態
    $ git status
    提交
    $ git commit
    幫某次 commit 加上含附註的標籤 tag
    $ git tag –a v1.1 –m ‘version 1.1’
    觀看提交歷程
    $ git log
  • 16. Basic Commands (3)
    複製遠端 repo.
    $ git clone git://github.com/schacon/grit.git
    自定義複製來的 repo. 名稱
    $ git clone git://github.com/schacon/grit.git mygrit
  • 17. First Commit
  • 18. Multiple Commit
  • 19. master
  • 20. Make a branch
    $ git branch testing
  • 21. Re-direct HEAD
    $ gitcheckout testing
  • 22. Commit on testing
  • 23. Back to master
    $ gitcheckout master
  • 24. Commit on master
  • 25. Basic Commands (4)
    查看現有的分支
    $ gitbranch               
    建立新的分支
    $ gitbranch 分支名稱
    切換到主幹上
    $ gitcheckout master 
    切換到某個分支上
    gitcheckout 分支名稱
  • 26.
  • 27. Resources
    Git - http://git-scm.com/
    Pro Git簡體翻譯 - http://progit.org/book/zh/
    Git初學文件整理 | Tsung'sBlog - http://plog.longwin.com.tw/my_note-unix/2009/05/14/git-learn-initial-document-2009