Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Git入门
Search
xautjzd
September 16, 2013
Programming
120
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Git入门
xautjzd
September 16, 2013
More Decks by xautjzd
See All by xautjzd
Introduction to Cloud Computing
xautjzd
0
65
ASP.NET MVC Model First
xautjzd
0
62
Other Decks in Programming
See All in Programming
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
1
610
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
220
ジョジョの世界をXRで再現する
mofurune
0
160
contenteditable と日本語入力に向き合う
colorful12
0
200
最近”作らせてる” ローカルAIアプリの話
akit37
0
470
Rでドレミ/Do-Re-Mi_with_R
florets1
0
130
FactoryBotをやめればRSpecは速くなるのか?
yuta_onishi_97
0
500
Vue Fes Japan の “作る側”に関わってみて
naokihaba
0
160
気持ちぃ〜角丸 Squircle
ryu1013
0
310
當我們開始不讀 Code - AI Agent 時代,Code Review 與 Clean Code 還剩下什麼?
jame2408
1
220
IBM Bob でAI駆動開発『QC-Playbook』
ichirokano2
0
110
Atomic Design, Enforced: Scaling Mobile Design Systems (next.app devCon / droidCon Berlin 2026)
steliosf
PRO
0
170
Featured
See All Featured
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
330
How to train your dragon (web standard)
notwaldorf
96
6.9k
Building AI with AI
inesmontani
PRO
1
1.3k
Designing for Performance
lara
612
70k
Docker and Python
trallard
47
4.2k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.3k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
77k
Everyday Curiosity
cassininazir
0
350
Build your cross-platform service in a week with App Engine
jlugia
234
19k
How to Talk to Developers About Accessibility
jct
2
580
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
630
Transcript
GIT入门 —— xautjzd A DISTRIBUTED VERSION CONTROL SYSTEM
Git 最初被Linus Torvalds设计用来管理 Linux 内核代码 现在很多项目都采用Git管理,如Android、Ruby、 Eclipse、jQuery、PHP、Perl、PostgreSQL等 Git开源免费,采用GPL 发布 Git概述
VCS分类 集中式版本控制器,eg:SVN 分布式版本控制器, eg: Git
共同点 随时回溯到之前的状态 回退到任何时间点 比较文件变化的细节 追溯代码修改作者 快速恢复文件
不同点 SVN:单点故障 Git: 操作更简单,体积更小,无 需网络,速度更快
Git演示——下载 下载地址: http://git-scm.com/downloads
Git演示——配置 系统配置(系统有效) /etc/gitconfig,git config --system 用户配置(当前用户有效) ~/.gitconfig, git config --global
项目配置(当前项目有效) .git/config, git config 查看配置信息 git config --list
Git演示——三种状态
Git演示——基本操作 •git init ——初始化repository •git clone ——克隆repository •git status ——
查看当前文件状态 •git add ——跟踪文件 •git commit ——提交文件 •git commit --amend ——撤销提交操作并重新提交 •.gitignore ——忽略某些文件,如编译生成的临时文件
Git演示——基本操作 •git rm ——删除文工作区和暂存区文件 •git rm -cached —— 删除repository和暂存区的文件而不删除 工作区文件,此操作是为了删除那些误纳入版本库的文件
•git diff ——对比工作区和暂存区 •git diff --cached ——对比暂存区和本地repository •git diff HEAD ——对比工作区和本地repository •git show HEAD ——查看当HEAD版本更新细节 •git log ——查看提交历史记录(-p显示提交的内容差异,而-n 则 显示最近n次的更新)
Git演示——基本操作 •git reset HEAD file ——取消暂存的文件 •git checkout --file ——取消文件的修改(还原文件)
•git checkout <commit version> filename——撤销到历史某一版本 •git remote -v ——查看远程仓库的配置 •git remote add ——配置远程仓库 •git pull —— 获取远程仓库而本地没有的数据(git fetch和git merge) •git push ——推送代码到远程仓库
Git演示——基本操作 •git branch branchname ——新建分支 •git checkout -b branchname ——新建分支并切换到该分支
参考资料 http://git-scm.com/book/zh/ https://github.com/progit/progit/tree/master/zh http://gitbook.liuhui998.com/
谢谢观赏 THANKS FOR YOUR READ THE END