Enviar pesquisa
Carregar
Git内部培训文档
•
Transferir como PPTX, PDF
•
1 gostou
•
1,337 visualizações
S
superwen
Seguir
Tecnologia
Denunciar
Compartilhar
Denunciar
Compartilhar
1 de 32
Baixar agora
Recomendados
Git flow Introduction
Git flow Introduction
David Paluy
Git undo
Git undo
Avilay Parekh
06 préparer le pmp management de de la communication
06 préparer le pmp management de de la communication
SAAD Mohamed, MBA,CISA, ITIL, PMP, ISO 27001 LA, CRISC
Git flow
Git flow
Valerio Como
Cours conduite projets culturels 2
Cours conduite projets culturels 2
hassan II university mohammedia
BMC economie collaborative
BMC economie collaborative
pushstartup
Git and GitFlow branching model
Git and GitFlow branching model
Pavlo Hodysh
Présentation Maven
Présentation Maven
SOAT
Recomendados
Git flow Introduction
Git flow Introduction
David Paluy
Git undo
Git undo
Avilay Parekh
06 préparer le pmp management de de la communication
06 préparer le pmp management de de la communication
SAAD Mohamed, MBA,CISA, ITIL, PMP, ISO 27001 LA, CRISC
Git flow
Git flow
Valerio Como
Cours conduite projets culturels 2
Cours conduite projets culturels 2
hassan II university mohammedia
BMC economie collaborative
BMC economie collaborative
pushstartup
Git and GitFlow branching model
Git and GitFlow branching model
Pavlo Hodysh
Présentation Maven
Présentation Maven
SOAT
Pert
Pert
Armelle Daniella
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
Rueful Robin
Git workflows
Git workflows
Xpand IT
Linux KVM のコードを追いかけてみよう
Linux KVM のコードを追いかけてみよう
Tsuyoshi OZAWA
Mastering Real-time Linux
Mastering Real-time Linux
Jean-François Deverge
A Git Workflow Model or Branching Strategy
A Git Workflow Model or Branching Strategy
Vivek Parihar
Reducing boot time in embedded Linux
Reducing boot time in embedded Linux
Chris Simmonds
[발표자료] 오픈소스 기반 고가용성 Pacemaker 소개 및 적용 사례_20230703_v1.1F.pptx
[발표자료] 오픈소스 기반 고가용성 Pacemaker 소개 및 적용 사례_20230703_v1.1F.pptx
ssuserf8b8bd1
Conduite et gestion de projet
Conduite et gestion de projet
JCI Ariana
Présentation de git
Présentation de git
Julien Blin
GitHub Basics - Derek Bable
GitHub Basics - Derek Bable
"FENG "GEORGE"" YU
Android デバッグ小ネタ
Android デバッグ小ネタ
l_b__
Introduction à la notion de projets
Introduction à la notion de projets
Donkichotte
git flow
git flow
Gabriel Gottgtroy Zigolis
[오픈소스컨설팅] Docker를 활용한 Gitlab CI/CD 구성 테스트
[오픈소스컨설팅] Docker를 활용한 Gitlab CI/CD 구성 테스트
Ji-Woong Choi
Understanding GIT and Version Control
Understanding GIT and Version Control
Sourabh Sahu
Git Series. Episode 3. Git Flow and Github-Flow
Git Series. Episode 3. Git Flow and Github-Flow
Mikhail Melnik
Qualite et redevapilite humanitaire
Qualite et redevapilite humanitaire
USIGGENEVE
Yocto project
Yocto project
University of Texas at Dallas
Lean Startup & Design Thinking.pptx (1).pdf
Lean Startup & Design Thinking.pptx (1).pdf
HibaBellafkih2
Git 入门实战
Git 入门实战
icy leaf
Git in a nutshell
Git in a nutshell
Nelson Tai
Mais conteúdo relacionado
Mais procurados
Pert
Pert
Armelle Daniella
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
Rueful Robin
Git workflows
Git workflows
Xpand IT
Linux KVM のコードを追いかけてみよう
Linux KVM のコードを追いかけてみよう
Tsuyoshi OZAWA
Mastering Real-time Linux
Mastering Real-time Linux
Jean-François Deverge
A Git Workflow Model or Branching Strategy
A Git Workflow Model or Branching Strategy
Vivek Parihar
Reducing boot time in embedded Linux
Reducing boot time in embedded Linux
Chris Simmonds
[발표자료] 오픈소스 기반 고가용성 Pacemaker 소개 및 적용 사례_20230703_v1.1F.pptx
[발표자료] 오픈소스 기반 고가용성 Pacemaker 소개 및 적용 사례_20230703_v1.1F.pptx
ssuserf8b8bd1
Conduite et gestion de projet
Conduite et gestion de projet
JCI Ariana
Présentation de git
Présentation de git
Julien Blin
GitHub Basics - Derek Bable
GitHub Basics - Derek Bable
"FENG "GEORGE"" YU
Android デバッグ小ネタ
Android デバッグ小ネタ
l_b__
Introduction à la notion de projets
Introduction à la notion de projets
Donkichotte
git flow
git flow
Gabriel Gottgtroy Zigolis
[오픈소스컨설팅] Docker를 활용한 Gitlab CI/CD 구성 테스트
[오픈소스컨설팅] Docker를 활용한 Gitlab CI/CD 구성 테스트
Ji-Woong Choi
Understanding GIT and Version Control
Understanding GIT and Version Control
Sourabh Sahu
Git Series. Episode 3. Git Flow and Github-Flow
Git Series. Episode 3. Git Flow and Github-Flow
Mikhail Melnik
Qualite et redevapilite humanitaire
Qualite et redevapilite humanitaire
USIGGENEVE
Yocto project
Yocto project
University of Texas at Dallas
Lean Startup & Design Thinking.pptx (1).pdf
Lean Startup & Design Thinking.pptx (1).pdf
HibaBellafkih2
Mais procurados
(20)
Pert
Pert
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
Git workflows
Git workflows
Linux KVM のコードを追いかけてみよう
Linux KVM のコードを追いかけてみよう
Mastering Real-time Linux
Mastering Real-time Linux
A Git Workflow Model or Branching Strategy
A Git Workflow Model or Branching Strategy
Reducing boot time in embedded Linux
Reducing boot time in embedded Linux
[발표자료] 오픈소스 기반 고가용성 Pacemaker 소개 및 적용 사례_20230703_v1.1F.pptx
[발표자료] 오픈소스 기반 고가용성 Pacemaker 소개 및 적용 사례_20230703_v1.1F.pptx
Conduite et gestion de projet
Conduite et gestion de projet
Présentation de git
Présentation de git
GitHub Basics - Derek Bable
GitHub Basics - Derek Bable
Android デバッグ小ネタ
Android デバッグ小ネタ
Introduction à la notion de projets
Introduction à la notion de projets
git flow
git flow
[오픈소스컨설팅] Docker를 활용한 Gitlab CI/CD 구성 테스트
[오픈소스컨설팅] Docker를 활용한 Gitlab CI/CD 구성 테스트
Understanding GIT and Version Control
Understanding GIT and Version Control
Git Series. Episode 3. Git Flow and Github-Flow
Git Series. Episode 3. Git Flow and Github-Flow
Qualite et redevapilite humanitaire
Qualite et redevapilite humanitaire
Yocto project
Yocto project
Lean Startup & Design Thinking.pptx (1).pdf
Lean Startup & Design Thinking.pptx (1).pdf
Semelhante a 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
Semelhante a 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
Baixar agora