SlideShare a Scribd company logo
1 of 34
git 初心者攻略
人生不能重來,但git可以...
開始之前...
Q: 怎麼做檔案備份
版本控制
版本控制?
• 儲存進度
• 讀取進度
• 管理不同紀錄
不怕神一般的對手 只怕豬一般的隊友
為什麼要版本控制?
• 程式為什麼不會動?
• 程式為什麼會有錯誤?
為什麼要版本控制?
1. 為什麼變更
2. 什麼時候變更
3. 變更了什麼
4. 知道誰變更
5. 切換/合併不同版本
重點就是
1.出事的時候知道從什麼時候開始又問題,
知道該找誰來罵!!
2.自己的黑鍋自己背!!
開始使用git
安裝
• Sourcetree
– https://www.sourcetreeapp.com/
設定
//設定你的資料(name & email)
$ git config --global user.name “your name"
$ git config --global user.email “your email“
//查看你的git設定
$ git config --list
建立第一個Repository
基礎概念
加到暫存區(add)
提交(commit)
查看狀態&檢視紀錄
分支(branch)
合併分支(merge)
rebase
遠端操作
clone
pull & push
常用指令
基本指令
$ git add
$ git commit
$ git status
$ git log
$ git merge
$ git branch
遠端操作
$ git clone
$ git push
$ git pull
參考資料
1) 連猴子都能懂的Git入門指南 | 貝格樂
(Backlog)
2) 30 天精通 Git 版本控管
3) 一步一步教你用 GitHub + SourceTree 做
版本控制
4) source tree下載與安裝
5) SourceTree 安裝筆記

More Related Content

Similar to Git raiders of junior

優雅的在 Emacs 中使用 git
優雅的在 Emacs 中使用 git優雅的在 Emacs 中使用 git
優雅的在 Emacs 中使用 git
Kai-Yuan Cheng
 
Mercurial簡介與教學
Mercurial簡介與教學Mercurial簡介與教學
Mercurial簡介與教學
芳本 林
 
Interact 操作消費者教學範例
Interact 操作消費者教學範例Interact 操作消費者教學範例
Interact 操作消費者教學範例
turtleknight
 
Git tutorial for windows user (給 Windows user 的 Git 教學)
Git tutorial for windows user (給 Windows user 的 Git 教學)Git tutorial for windows user (給 Windows user 的 Git 教學)
Git tutorial for windows user (給 Windows user 的 Git 教學)
Cloud Tu
 

Similar to Git raiders of junior (20)

Learning to Use Git | WeiYuan
Learning to Use Git | WeiYuanLearning to Use Git | WeiYuan
Learning to Use Git | WeiYuan
 
優雅的在 Emacs 中使用 git
優雅的在 Emacs 中使用 git優雅的在 Emacs 中使用 git
優雅的在 Emacs 中使用 git
 
Learn git
Learn gitLearn git
Learn git
 
GDGK (LT) - Git 工作流程
GDGK (LT) - Git 工作流程GDGK (LT) - Git 工作流程
GDGK (LT) - Git 工作流程
 
Learn python 2 - Real World Case
Learn python 2 - Real World CaseLearn python 2 - Real World Case
Learn python 2 - Real World Case
 
Git 入門與實作
Git 入門與實作Git 入門與實作
Git 入門與實作
 
Mercurial簡介與教學
Mercurial簡介與教學Mercurial簡介與教學
Mercurial簡介與教學
 
Git 使用介绍
Git 使用介绍Git 使用介绍
Git 使用介绍
 
20160420 - git intro
20160420 - git intro20160420 - git intro
20160420 - git intro
 
20170510 git 懶人包
20170510 git 懶人包20170510 git 懶人包
20170510 git 懶人包
 
Interact 操作消費者教學範例
Interact 操作消費者教學範例Interact 操作消費者教學範例
Interact 操作消費者教學範例
 
Git入門介紹
Git入門介紹Git入門介紹
Git入門介紹
 
Git and git hub
Git and git hubGit and git hub
Git and git hub
 
Git tutorial for windows user (給 Windows user 的 Git 教學)
Git tutorial for windows user (給 Windows user 的 Git 教學)Git tutorial for windows user (給 Windows user 的 Git 教學)
Git tutorial for windows user (給 Windows user 的 Git 教學)
 
Gitlab
GitlabGitlab
Gitlab
 
Git Flow 管理
Git Flow 管理Git Flow 管理
Git Flow 管理
 
簡介 GitHub 平台
簡介 GitHub 平台簡介 GitHub 平台
簡介 GitHub 平台
 
簡介 Git hub 平台 ( 1.5 hrs )
簡介 Git hub 平台 ( 1.5 hrs )簡介 Git hub 平台 ( 1.5 hrs )
簡介 Git hub 平台 ( 1.5 hrs )
 
為自己學 Git
為自己學 Git為自己學 Git
為自己學 Git
 
開發環境建置
開發環境建置開發環境建置
開發環境建置
 

Git raiders of junior