Suche senden
Hochladen
Git内部培训文档
•
Als PPTX, PDF herunterladen
•
1 gefällt mir
•
1,338 views
S
superwen
Folgen
Technologie
Melden
Teilen
Melden
Teilen
1 von 32
Jetzt herunterladen
Empfohlen
JVM Mechanics: When Does the JVM JIT & Deoptimize?
JVM Mechanics: When Does the JVM JIT & Deoptimize?
Doug Hawkins
PostgreSQL Streaming Replication Cheatsheet
PostgreSQL Streaming Replication Cheatsheet
Alexey Lesovsky
Apache Spark Architecture
Apache Spark Architecture
Alexey Grishchenko
Unified Batch and Real-Time Stream Processing Using Apache Flink
Unified Batch and Real-Time Stream Processing Using Apache Flink
Slim Baltagi
MySQL Performance Schema in Action: the Complete Tutorial
MySQL Performance Schema in Action: the Complete Tutorial
Sveta Smirnova
M|18 Battle of the Online Schema Change Methods
M|18 Battle of the Online Schema Change Methods
MariaDB plc
Introduction to Redis
Introduction to Redis
Knoldus Inc.
Mysql-MHA
Mysql-MHA
Louis liu
Empfohlen
JVM Mechanics: When Does the JVM JIT & Deoptimize?
JVM Mechanics: When Does the JVM JIT & Deoptimize?
Doug Hawkins
PostgreSQL Streaming Replication Cheatsheet
PostgreSQL Streaming Replication Cheatsheet
Alexey Lesovsky
Apache Spark Architecture
Apache Spark Architecture
Alexey Grishchenko
Unified Batch and Real-Time Stream Processing Using Apache Flink
Unified Batch and Real-Time Stream Processing Using Apache Flink
Slim Baltagi
MySQL Performance Schema in Action: the Complete Tutorial
MySQL Performance Schema in Action: the Complete Tutorial
Sveta Smirnova
M|18 Battle of the Online Schema Change Methods
M|18 Battle of the Online Schema Change Methods
MariaDB plc
Introduction to Redis
Introduction to Redis
Knoldus Inc.
Mysql-MHA
Mysql-MHA
Louis liu
Redis basics
Redis basics
Arthur Shvetsov
DevOps Days Kyiv 2019 -- Victoria Metrics // Artem Navoiev
DevOps Days Kyiv 2019 -- Victoria Metrics // Artem Navoiev
Mykola Marzhan
Hive+Tez: A performance deep dive
Hive+Tez: A performance deep dive
t3rmin4t0r
MySQL/MariaDB Proxy Software Test
MySQL/MariaDB Proxy Software Test
I Goo Lee
Cephfs架构解读和测试分析
Cephfs架构解读和测试分析
Yang Guanjun
Hadoop and OpenStack
Hadoop and OpenStack
DataWorks Summit
Introduction to Redis
Introduction to Redis
Maarten Smeets
Best practices for MySQL/MariaDB Server/Percona Server High Availability
Best practices for MySQL/MariaDB Server/Percona Server High Availability
Colin Charles
Apache Sling : JCR, OSGi, Scripting and REST
Apache Sling : JCR, OSGi, Scripting and REST
Carsten Ziegeler
Postgres Vision 2018: WAL: Everything You Want to Know
Postgres Vision 2018: WAL: Everything You Want to Know
EDB
Zero-Copy Event-Driven Servers with Netty
Zero-Copy Event-Driven Servers with Netty
Daniel Bimschas
High Concurrency Architecture at TIKI
High Concurrency Architecture at TIKI
Nghia Minh
The InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQL
Morgan Tocker
Airflow presentation
Airflow presentation
Ilias Okacha
MongoDB Fundamentals
MongoDB Fundamentals
MongoDB
Dd and atomic ddl pl17 dublin
Dd and atomic ddl pl17 dublin
Ståle Deraas
Inno Db Internals Inno Db File Formats And Source Code Structure
Inno Db Internals Inno Db File Formats And Source Code Structure
MySQLConference
OrientDB introduction - NoSQL
OrientDB introduction - NoSQL
Luca Garulli
Boomi Molecule Migration to the Cloud: Top 5 Strategies Revealed
Boomi Molecule Migration to the Cloud: Top 5 Strategies Revealed
Kellton Tech Solutions Ltd
The Full MySQL and MariaDB Parallel Replication Tutorial
The Full MySQL and MariaDB Parallel Replication Tutorial
Jean-François Gagné
Git 入门实战
Git 入门实战
icy leaf
Git in a nutshell
Git in a nutshell
Nelson Tai
Weitere ähnliche Inhalte
Was ist angesagt?
Redis basics
Redis basics
Arthur Shvetsov
DevOps Days Kyiv 2019 -- Victoria Metrics // Artem Navoiev
DevOps Days Kyiv 2019 -- Victoria Metrics // Artem Navoiev
Mykola Marzhan
Hive+Tez: A performance deep dive
Hive+Tez: A performance deep dive
t3rmin4t0r
MySQL/MariaDB Proxy Software Test
MySQL/MariaDB Proxy Software Test
I Goo Lee
Cephfs架构解读和测试分析
Cephfs架构解读和测试分析
Yang Guanjun
Hadoop and OpenStack
Hadoop and OpenStack
DataWorks Summit
Introduction to Redis
Introduction to Redis
Maarten Smeets
Best practices for MySQL/MariaDB Server/Percona Server High Availability
Best practices for MySQL/MariaDB Server/Percona Server High Availability
Colin Charles
Apache Sling : JCR, OSGi, Scripting and REST
Apache Sling : JCR, OSGi, Scripting and REST
Carsten Ziegeler
Postgres Vision 2018: WAL: Everything You Want to Know
Postgres Vision 2018: WAL: Everything You Want to Know
EDB
Zero-Copy Event-Driven Servers with Netty
Zero-Copy Event-Driven Servers with Netty
Daniel Bimschas
High Concurrency Architecture at TIKI
High Concurrency Architecture at TIKI
Nghia Minh
The InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQL
Morgan Tocker
Airflow presentation
Airflow presentation
Ilias Okacha
MongoDB Fundamentals
MongoDB Fundamentals
MongoDB
Dd and atomic ddl pl17 dublin
Dd and atomic ddl pl17 dublin
Ståle Deraas
Inno Db Internals Inno Db File Formats And Source Code Structure
Inno Db Internals Inno Db File Formats And Source Code Structure
MySQLConference
OrientDB introduction - NoSQL
OrientDB introduction - NoSQL
Luca Garulli
Boomi Molecule Migration to the Cloud: Top 5 Strategies Revealed
Boomi Molecule Migration to the Cloud: Top 5 Strategies Revealed
Kellton Tech Solutions Ltd
The Full MySQL and MariaDB Parallel Replication Tutorial
The Full MySQL and MariaDB Parallel Replication Tutorial
Jean-François Gagné
Was ist angesagt?
(20)
Redis basics
Redis basics
DevOps Days Kyiv 2019 -- Victoria Metrics // Artem Navoiev
DevOps Days Kyiv 2019 -- Victoria Metrics // Artem Navoiev
Hive+Tez: A performance deep dive
Hive+Tez: A performance deep dive
MySQL/MariaDB Proxy Software Test
MySQL/MariaDB Proxy Software Test
Cephfs架构解读和测试分析
Cephfs架构解读和测试分析
Hadoop and OpenStack
Hadoop and OpenStack
Introduction to Redis
Introduction to Redis
Best practices for MySQL/MariaDB Server/Percona Server High Availability
Best practices for MySQL/MariaDB Server/Percona Server High Availability
Apache Sling : JCR, OSGi, Scripting and REST
Apache Sling : JCR, OSGi, Scripting and REST
Postgres Vision 2018: WAL: Everything You Want to Know
Postgres Vision 2018: WAL: Everything You Want to Know
Zero-Copy Event-Driven Servers with Netty
Zero-Copy Event-Driven Servers with Netty
High Concurrency Architecture at TIKI
High Concurrency Architecture at TIKI
The InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQL
Airflow presentation
Airflow presentation
MongoDB Fundamentals
MongoDB Fundamentals
Dd and atomic ddl pl17 dublin
Dd and atomic ddl pl17 dublin
Inno Db Internals Inno Db File Formats And Source Code Structure
Inno Db Internals Inno Db File Formats And Source Code Structure
OrientDB introduction - NoSQL
OrientDB introduction - NoSQL
Boomi Molecule Migration to the Cloud: Top 5 Strategies Revealed
Boomi Molecule Migration to the Cloud: Top 5 Strategies Revealed
The Full MySQL and MariaDB Parallel Replication Tutorial
The Full MySQL and MariaDB Parallel Replication Tutorial
Ähnlich wie Git内部培训文档
Git 入门实战
Git 入门实战
icy leaf
Git in a nutshell
Git in a nutshell
Nelson Tai
Git Essence Tutorial
Git Essence Tutorial
Ho Kim
Introduction to git
Introduction to git
Bo-Yi Wu
Git基礎介紹
Git基礎介紹
Max Ma
Git 程式碼版本控制軟體介紹
Git 程式碼版本控制軟體介紹
PingLun Liao
Git 超簡單學習懶人包(軟體程式版本控管系統)
Git 超簡單學習懶人包(軟體程式版本控管系統)
flylon
Git & git flow
Git & git flow
Amo Wu
Git教學
Git教學
Sitg Yao
版本控制 使用Git & git hub
版本控制 使用Git & git hub
維佋 唐
Git原理与实战 201607
Git原理与实战 201607
Charles Tang
Git 簡介(古時候的簡報備份)
Git 簡介(古時候的簡報備份)
Hsin-lin Cheng
Git 教學
Git 教學
Ming-Sian Lin
工程師必備第一工具 - Git
工程師必備第一工具 - Git
Alan Tsai
Git 使用介绍
Git 使用介绍
medcl
First meetingwithgit
First meetingwithgit
Rhythm Sun
Git+使用教程
Git+使用教程
gemron
20170510 git 懶人包
20170510 git 懶人包
Chen-Ming Yang
Git and git hub
Git and git hub
唯 李
Git使用入门
Git使用入门
dpf2e
Ähnlich wie Git内部培训文档
(20)
Git 入门实战
Git 入门实战
Git in a nutshell
Git in a nutshell
Git Essence Tutorial
Git Essence Tutorial
Introduction to git
Introduction to git
Git基礎介紹
Git基礎介紹
Git 程式碼版本控制軟體介紹
Git 程式碼版本控制軟體介紹
Git 超簡單學習懶人包(軟體程式版本控管系統)
Git 超簡單學習懶人包(軟體程式版本控管系統)
Git & git flow
Git & git flow
Git教學
Git教學
版本控制 使用Git & git hub
版本控制 使用Git & git hub
Git原理与实战 201607
Git原理与实战 201607
Git 簡介(古時候的簡報備份)
Git 簡介(古時候的簡報備份)
Git 教學
Git 教學
工程師必備第一工具 - Git
工程師必備第一工具 - Git
Git 使用介绍
Git 使用介绍
First meetingwithgit
First meetingwithgit
Git+使用教程
Git+使用教程
20170510 git 懶人包
20170510 git 懶人包
Git and git hub
Git and git hub
Git使用入门
Git使用入门
Git内部培训文档
1.
superwen
2.
Linux 内核开源项目有着为数众广的参与者。一开始
整个项目组BitKeeper 来管理和维护代码。 2005 年, BitKeeper不再能免费使用,这就迫使 Linux 开源社区 开发一套属于自己的版本控制系统。 自诞生于 2005 年以来,Git 日臻成熟完善,它的速度 飞快,极其适合管理大项目,它还有着令人难以置信 的非线性分支管理系统,可以应付各种复杂的项目开 发需求。
3.
直接记录快照,而非差异比较。 近乎所有操作都是本地执行
时刻保持数据完整性 多数操作仅添加数据 文件的三种状态-已修改(modified)、已暂存 (staged)和已提交(committed)
4.
本地建立版本库 本地版本控制
多主机异地协同工作 重写提交说明 有后悔药可以吃 更好用的提交列表 更好的差异比较。 更完善的分支系统 代理SVN提交实现移动式办公 无处不在的分页器 速度快
5.
使用包安装,以centos为例
$ yum install git $ yum install git-svn git-email git-gui gitk 使用源代码安装 从官网下载源码 http://git-scm.com $ tar –jxvf git-version.tar.bz2 $ cd git-version $ make prefix=/usr/local all $ sudo make install prefix=/usr/local
6.
通过Cygwin安装(不建议)
http://www.cygwin.com 通过msysGit http://code.google.com/p/msysgit 完成安装之后,就可以使用命令行的 git 工具(已经 自带了 ssh 客户端)了,另外还有一个图形界面的 Git 项目管理工具。 可视化工具TortoiseGit http://code.google.com/p/ tortoisegit
7.
#查看版本 $ git --version #配置 $
git config --global user.name "John Doe" $ git config --global user.email johndoe@example.com //--system 系统配置 //--global 该用户的全局配置 #查看配置信息 $ git config --list $ git config user.name #获取帮助,任意一个都可以 $ git help config $ git config --help $ man git-config
8.
#在工作目录中初始化新仓库 $ cd myproject $
git init #从现有仓库克隆,克隆完整数据,包括版本信息 $ git clone git://github.com/schacon/grit.git $ git clone git://github.com/schacon/grit.git mygrit #检查当前文件状态 $ git status
9.
#跟踪新文件 $ git add
*.c #将文件添加到暂缓区,每次修改之后都需要将文件放到暂缓区去 $ git add *.c #忽略某些文件 #修改 .gitignore *.a # 忽略所有 .a 结尾的文件 !lib.a # 但 lib.a 除外 /TODO # 仅仅忽略项目根目录下的 TODO 文件,不包括 subdir/TODO build/ # 忽略 build/ 目录下的所有文件 doc/*.txt # 会忽略 doc/notes.txt 但不包括 doc/server/arch.txt
10.
#查看尚未暂存的文件更新了哪些部分 $ git diff #查看暂存区文件和上次提交的快照之间的差异 $
git diff --cached
11.
#提交更新 #每次准备提交前,先用 git status
看下,是不是都已暂 #存起来了,然后再运行提交命令 $ git commit $ git commit -m 'initial project version' #跳过使用暂存区域 $ git commit -a
12.
#移除文件 $ git rm
grit.gemspec #移除已经修改的文件 $ git rm grit.gemspec-f #仅仅从暂缓区移除 $ git rm grit.gemspec
13.
#移除文件 $ git rm
grit.gemspec #移除已经修改的文件 $ git rm grit.gemspec-f #仅仅从暂缓区移除 $ git rm grit.gemspec #移动文件 $ git mv file_from file_to
14.
#查看提交历史 $ git log -p
展开显示每次提交的内容差异 -n 则仅显示最近的n次更新 --stat,仅显示简要的增改行数统计 --pretty=format:"%h - %an, %ar : %s"
15.
#修改最后一次提交 $ git commit
-m 'initial commit' $ git add forgotten_file $ git commit –amend #上面的三条命令最终只是产生一个提交. #取消已经暂存的文件 $ git reset HEAD benchmarks.rb #取消对文件的修改 $ git checkout -- benchmarks.rb
16.
#查看当前的远程库 $ git remote #显示对应的克隆地址(origin
为默认的远程库名称) $ git remote –v #添加远程仓库 $ git remote add pb git://github.com/paulboone/ticgit.git
17.
#从远程仓库抓取数据 #fetch 命令只是将远端的数据拉到本地仓库,并不自动
合并到当前工作分支 $ git fetch [remote-name] #推送数据到远程仓库 $ git push origin master
18.
#查看远程仓库信息 $ git remote
show origin #远程仓库的重命名 $ git remote rename pb paul #远程仓库的删除 $ git remote rm paul
19.
#列显已有的标签 $ git tag #列出符合条件的标签 $
git tag -l 'v1.4.2.*'
20.
#新建标签 #标签有两种类型:轻量级的(lightweight)和含附注 的(annotated) #创建一个轻量级标签 $
git tag v1.4-lw #创建一个含附注类型的标签非常简单 $ git tag -a v1.4 -m 'my version 1.4'
21.
#分享标签 #默认情况下,git push 不会把标签传送到远端服务器 $
git push origin v1.5 #一次推送所有本地新增的标签 $ git push origin --tags
22.
#自动完成 #Windows 上安装了 msysGit,默认已经配好了这个自
动完成脚本。 #Linux 上 $ cp {$GitHome}contrib/completion/git- completion.bash /etc/bash_completion.d/
23.
#Git 命令别名 $ git
config --global alias.co checkout $ git config --global alias.br branch $ git config --global alias.last 'log -1 HEAD'
24.
#创建分支 $ git branch
testing #切换到分支 $ git checkout testing #创建并切换到分支 $ git checkout -b testing
25.
26.
27.
#与当前分支合并 $ git merge
testing #合并时难免有冲突 #调用图形化工具解决冲突 $ git mergetool #删除分支(不能删除一个未合并的分支) $ git branch -d testing #强制删除一个分支 $ git branch -D testing
28.
29.
30.
#查看分支 $ git branch #查看分支最后一次提交的信息 $
git branch -v #查看已经合并|尚未合并的分支 $ git branch --merged|no-merged
31.
#同步远程服务器上的数据到本地 $ git fetch
origin #推送本地分支 $ git push origin serverfix #推送本地分支serverfix为origin的awesomebranch分支 $ git push origin serverfix:awesomebranch #删除远程分支 $ git push origin:serverfix
Jetzt herunterladen