Soumettre la recherche
Mettre en ligne
Git内部培训文档
•
Télécharger en tant que PPTX, PDF
•
1 j'aime
•
1,338 vues
S
superwen
Suivre
Technologie
Signaler
Partager
Signaler
Partager
1 sur 32
Télécharger maintenant
Recommandé
Git vs svn
Git vs svn
Suman Mukherjee
GIT presentation
GIT presentation
Naim Latifi
Git - Basic Crash Course
Git - Basic Crash Course
Nilay Binjola
Introduction to Gitlab | Gitlab 101 | Training Session
Introduction to Gitlab | Gitlab 101 | Training Session
Anwarul Islam
GitLab.pptx
GitLab.pptx
LeoulZewelde1
Git.pptx
Git.pptx
GDSC UofT Mississauga
Git One Day Training Notes
Git One Day Training Notes
glen_a_smith
Git training v10
Git training v10
Skander Hamza
Recommandé
Git vs svn
Git vs svn
Suman Mukherjee
GIT presentation
GIT presentation
Naim Latifi
Git - Basic Crash Course
Git - Basic Crash Course
Nilay Binjola
Introduction to Gitlab | Gitlab 101 | Training Session
Introduction to Gitlab | Gitlab 101 | Training Session
Anwarul Islam
GitLab.pptx
GitLab.pptx
LeoulZewelde1
Git.pptx
Git.pptx
GDSC UofT Mississauga
Git One Day Training Notes
Git One Day Training Notes
glen_a_smith
Git training v10
Git training v10
Skander Hamza
Introduction to Gitlab
Introduction to Gitlab
Julien Pivotto
Git in 10 minutes
Git in 10 minutes
Safique Ahmed Faruque
Git Sunumu
Git Sunumu
Zafer Gürel
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
Linaro
Introduction to Git
Introduction to Git
Colin Su
Advanced nGrinder 2nd Edition
Advanced nGrinder 2nd Edition
JunHo Yoon
Introducing GitLab (September 2018)
Introducing GitLab (September 2018)
Noa Harel
Comparison of SVN and Git
Comparison of SVN and Git
Daniel Wieth
Everything you always wanted to know about Redis but were afraid to ask
Everything you always wanted to know about Redis but were afraid to ask
Carlos Abalde
Grokking opensource with github
Grokking opensource with github
GoogleDeveloperStude4
Learning git
Learning git
Sid Anand
Git vs svn
Git vs svn
Rupesh Kumar
Git commands
Git commands
Viyaan Jhiingade
이승재, 일정대로 출시하기 왜 & 어떻게: 개발자를 위한 제작진행개론, NDC2017
이승재, 일정대로 출시하기 왜 & 어떻게: 개발자를 위한 제작진행개론, NDC2017
devCAT Studio, NEXON
Devops Porto - CI/CD at Gitlab
Devops Porto - CI/CD at Gitlab
Filipa Lacerda
Introduction git
Introduction git
Dian Sigit Prastowo
Basic Git Intro
Basic Git Intro
Yoad Snapir
Hundred Percenters
Hundred Percenters
Business Book Summaries
Git for beginners
Git for beginners
Arulmurugan Rajaraman
Les bases de git
Les bases de git
Pierre Sudron
Git 入门实战
Git 入门实战
icy leaf
Git in a nutshell
Git in a nutshell
Nelson Tai
Contenu connexe
Tendances
Introduction to Gitlab
Introduction to Gitlab
Julien Pivotto
Git in 10 minutes
Git in 10 minutes
Safique Ahmed Faruque
Git Sunumu
Git Sunumu
Zafer Gürel
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
Linaro
Introduction to Git
Introduction to Git
Colin Su
Advanced nGrinder 2nd Edition
Advanced nGrinder 2nd Edition
JunHo Yoon
Introducing GitLab (September 2018)
Introducing GitLab (September 2018)
Noa Harel
Comparison of SVN and Git
Comparison of SVN and Git
Daniel Wieth
Everything you always wanted to know about Redis but were afraid to ask
Everything you always wanted to know about Redis but were afraid to ask
Carlos Abalde
Grokking opensource with github
Grokking opensource with github
GoogleDeveloperStude4
Learning git
Learning git
Sid Anand
Git vs svn
Git vs svn
Rupesh Kumar
Git commands
Git commands
Viyaan Jhiingade
이승재, 일정대로 출시하기 왜 & 어떻게: 개발자를 위한 제작진행개론, NDC2017
이승재, 일정대로 출시하기 왜 & 어떻게: 개발자를 위한 제작진행개론, NDC2017
devCAT Studio, NEXON
Devops Porto - CI/CD at Gitlab
Devops Porto - CI/CD at Gitlab
Filipa Lacerda
Introduction git
Introduction git
Dian Sigit Prastowo
Basic Git Intro
Basic Git Intro
Yoad Snapir
Hundred Percenters
Hundred Percenters
Business Book Summaries
Git for beginners
Git for beginners
Arulmurugan Rajaraman
Les bases de git
Les bases de git
Pierre Sudron
Tendances
(20)
Introduction to Gitlab
Introduction to Gitlab
Git in 10 minutes
Git in 10 minutes
Git Sunumu
Git Sunumu
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
Introduction to Git
Introduction to Git
Advanced nGrinder 2nd Edition
Advanced nGrinder 2nd Edition
Introducing GitLab (September 2018)
Introducing GitLab (September 2018)
Comparison of SVN and Git
Comparison of SVN and Git
Everything you always wanted to know about Redis but were afraid to ask
Everything you always wanted to know about Redis but were afraid to ask
Grokking opensource with github
Grokking opensource with github
Learning git
Learning git
Git vs svn
Git vs svn
Git commands
Git commands
이승재, 일정대로 출시하기 왜 & 어떻게: 개발자를 위한 제작진행개론, NDC2017
이승재, 일정대로 출시하기 왜 & 어떻게: 개발자를 위한 제작진행개론, NDC2017
Devops Porto - CI/CD at Gitlab
Devops Porto - CI/CD at Gitlab
Introduction git
Introduction git
Basic Git Intro
Basic Git Intro
Hundred Percenters
Hundred Percenters
Git for beginners
Git for beginners
Les bases de git
Les bases de git
Similaire à 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
Similaire à 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
Télécharger maintenant