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
scottxu
July 29, 2014
Technology
130
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
git 入门
地图汇内部的git入门培训。
scottxu
July 29, 2014
More Decks by scottxu
See All by scottxu
rails中mysql应用
scottxu
0
110
Other Decks in Technology
See All in Technology
ソフトウェア ファクトリー - 再現性のあるソフトウェアの工場づくり / Software factory
iktakahiro
6
4.9k
Claude の新機能を、 出た日に触って社内に届けるまで
rfdnxbro
1
180
Code for Security プロジェクト紹介 2026年10月
yu23ki14
0
110
アウトプット初心者、半年間のふりかえり
4o1sobblue
0
430
分析の民主化を支えるメタデータ整備の実践
kakehashi
PRO
4
1.4k
サブエージェントと Claude Mods で作る独自 Advisor ツールの話
kenichiodo
2
160
OptunaHub: ブラックボックス最適化のためのプラットフォーム
pfn
PRO
0
140
V8のArray.prototype.flatを最大約20倍速くするまでと、巨大OSSへの大規模コミットの道のり
riyaamemiya
0
290
TinyGoでオブザーバビリティ?OpenTelemetryはTinyGoで使えるのか / Is OpenTelemetry available in TinyGo environment?
ymotongpoo
2
140
PagerDuty Tech Hub-鳴らすけれど、人は動かない
ezaki
0
170
Rustuna: Rustによる高速なOptuna実装
pfn
PRO
0
190
AI駆動開発の時代になったのでトヨタ生産方式から見直す
terurou
7
6k
Featured
See All Featured
Intergalactic Javascript Robots from Outer Space
tanoku
273
28k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
540
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.7k
The Curious Case for Waylosing
cassininazir
1
570
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.7k
Accessibility Awareness
sabderemane
1
250
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1.1k
Utilizing Notion as your number one productivity tool
mfonobong
4
620
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.1k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k
Building Applications with DynamoDB
mza
96
7.2k
A designer walks into a library…
pauljervisheath
211
25k
Transcript
浅谈git 地图汇 徐炳超
Git是一个分布式版本控制/软件配置管理软件,原 是Linux内核开发者林纳斯· 托瓦兹(Linus Torvalds) 为更好地管理Linux内核开发而设计。 什么是git?
优点:版本的分支(branch)和合并(merge)十分 方便。有些传统的版本管理软件,分支操作实际上 会生成一份现有代码的物理拷贝,而Git只生成一个 指向当前版本(又称"快照")的指针,因此非常快 捷易用。 为什么用git?
缺点:但是,太方便了也会产生副作用。如果你不 加注意,很可能会留下一个枝节蔓生、四处开放的 版本库,到处都是分支,完全看不出主干发展的脉 络。 git的缺点
git的缺点
sudo apt-get install git 安装git
mkdir dituhui git init 创建新仓库
git add . git commit –m “my first
git test” 添加和提交
git remote add origin <server> 例如: git
remote add origin
[email protected]
:/home/code/dituhui.git 首次推送服务器上
git clone {name}@{ip}:/xxx/yyy.git 例如: git clone
[email protected]
:/home/code/dituhui.git
检出仓库
master 主分支(发布分支) dev 开发分支 分支
git checkout -b f-xxx git merge dev
git branch –D f-xxx
master dev 部署 部署 部署 部署 f-marker f-line f-group 主分支
开发分支 本地分支
git stash git stash list git stash
apply 储藏
git tag #列出tag的列表 git tag v1.0.0 #打标签
git push origin v1.0.0 #将本地标签推送到服务器端 git ls-remote origin #显示tag git pull origin refs/tags/v1.0.0 git 里程碑
git log -g #找到删除的日志编号(commit 7049580b481d895fa490cf91f632512fa6653612) git branch 7049580b481d895fa490cf91f632512fa6653612
#(recover_branch) git恢复删除的分支
git diff 对比差异 git checkout filename(“.”代表全部) git
reset --hard origin/dev 放弃本地,恢复和dev一致 常用命令
git config color.ui true 变更用彩色显示
ssh-keygen -t rsa #如果你有就不用这步了。 cat .ssh/id_rsa.pub | ssh
{host}@{ip} 'cat>>.ssh/authorized_keys' git / ssh 不用每次都输入密码的方法
git