SlideShare a Scribd company logo
DVCS
• Visual SourceSafe
• CVS/Subversion/TFS/etc.
• Git/Mercurial/Bazaar/etc.
Why?
•
Subversion, CVS, etc.



•
•
•
    or
•
→
CVS/SVN/etc.   Git/Mercurial/etc.



  revision         changeset
•   ≠

•   merge

•
• Mercurial   SVN
% hg
Mercurial Distributed SCM

basic commands:

 add        add the specified files on the next commit
 annotate   show changeset information by line for each file
 clone      make a copy of an existing repository
 commit     commit the specified files or all outstanding changes
 diff       diff repository (or selected files)
 export     dump the header and diffs for one or more changesets
 forget     forget the specified files on the next commit
 init       create a new repository in the given directory
 log        show revision history of entire repository or files
 merge      merge working directory with another revision
 pull       pull changes from the specified source
 push       push changes to the specified destination
 remove     remove the specified files on the next commit
 serve      start stand-alone webserver
 status     show changed files in the working directory
 summary    summarize working directory state
 update     update working directory (or switch revisions)

use "hg help" for the full list of commands or "hg -v" for details
% pwd
/Users/neo/Code/Repo/hginit

% ll
total 24
drwxr-xr-x  5 neo   staff      170   Aug 7 13:13 .
drwxr-xr-x 12 neo   staff      408   Aug 7 13:11 ..
-rw-r--r--@ 1 neo   staff     1605   Jun 26 12:23 Info.plist
-rw-r--r--@ 1 neo   staff     2907   Jun 19 16:18 global.html
-rw-r--r--  1 neo   staff     1183   Jun 12 16:22 link.png

% hg init

% ll
total 24
drwxr-xr-x  6 neo   staff      204   Aug 7 13:14 .
drwxr-xr-x 12 neo   staff      408   Aug 7 13:11 ..
drwxr-xr-x  5 neo   staff      170   Aug 7 13:14 .hg
-rw-r--r--@ 1 neo   staff     1605   Jun 26 12:23 Info.plist
-rw-r--r--@ 1 neo   staff     2907   Jun 19 16:18 global.html
-rw-r--r--  1 neo   staff     1183   Jun 12 16:22 link.png
% hg add
      adding Info.plist
      adding global.html
      adding link.png

      % hg commit




                                     % hg log
                                     changeset:     0:0ae94e57c184
% hg commit
                                     tag:           tip
Info.plist
                                     user:          "Neo Lee <neo.lee at gmail.com>"
global.html
                                     date:          Sat Aug 07 14:43:24 2010 +0800
link.png
                                     files:         Info.plist global.html link.png
committed changeset 0:0ae94e57c184
                                     description:
                                     Init commit.
% hg commit




% hg log
changeset:   1:dc12cb350527
tag:         tip
user:        "Neo Lee <neo.lee at gmail.com>"
date:        Sat Aug 07 14:54:57 2010 +0800
files:       global.html
description:
Capitalize 'ERROR' prompt.



changeset:     0:0ae94e57c184
user:          "Neo Lee <neo.lee at gmail.com>"
date:          Sat Aug 07 14:43:24 2010 +0800
files:         Info.plist global.html link.png
description:
Init commit.
% rm Info.plist
% rm link.png




% e global.html
%




% hg revert --all
reverting Info.plist
reverting link.png
reverting global.html
1.
2.
3.         commit
4.          revert
5.   (1)
% cp Info.plist Info.plist.1
% e Info.plist
% rm link.png
remove link.png? y

%   hg status
M   Info.plist
!   link.png
?   Info.plist.1

% hg diff Info.plist
diff -r dc12cb350527 Info.plist
--- a/Info.plist         Sat Aug 07 14:54:57 2010 +0800
+++ b/Info.plist         Sat Aug 07 15:07:18 2010 +0800
@@ -3,7 +3,7 @@
  <plist version="1.0">
  <dict>
         <key>Author</key>
-        <string>Neo Lee</string>
+        <string>Li Jun</string>
         <key>CFBundleDisplayName</key>
         <string>Goo.gl</string>
         <key>CFBundleIdentifier</key>
% hg log
                       changeset:   2:5ba69dac6378
                       tag:         tip
                       user:        "Neo Lee <neo.lee at gmail.com>"
% hg remove link.png
                       date:        Sat Aug 07 15:10:02 2010 +0800
removing link.png
                       files:       Info.plist Info.plist.1 link.png
                       description:
%   hg status
                       Some dirty work!
M   Info.plist
R   link.png
?   Info.plist.1
                       changeset:   1:dc12cb350527
                       user:        "Neo Lee <neo.lee at gmail.com>"
% hg add
                       date:        Sat Aug 07 14:54:57 2010 +0800
adding Info.plist.1
                       files:       global.html
                       description:
%   hg st
                       Capitalize 'ERROR' prompt.
M   Info.plist
A   Info.plist.1
R   link.png
                       changeset:     0:0ae94e57c184
                       user:          "Neo Lee <neo.lee at gmail.com>"
% hg commit
                       date:          Sat Aug 07 14:43:24 2010 +0800
                       files:         Info.plist global.html link.png
                       description:
                       Init commit.
% hg cat Info.plist


% hg cat -r 0 Info.plist


% hg diff -r 0:1 Info.plist


% hg update -r 0


% hg up -r 1


% hg up
% mkdir repo

% cd repo

% hg init

% hg serve
listening at http://8.oasis.local:8000/ (bound to *:8000)
% hg clone http://8.oasis.local:8000/ working
no changes found
updating to branch default
resolving manifests
0 files updated, 0 files merged, 0 files removed, 0 files unresolved


% cd working


% ll
total 0
drwxr-xr-x     3 neo   staff   102 Aug   7 15:49 .
drwxr-xr-x     4 neo   staff   136 Aug   7 15:49 ..
drwxr-xr-x     8 neo   staff   272 Aug   7 15:49 .hg
% hg push

Joel   pushing to http://8.oasis.local:8000/
       searching for changes
       adding changesets
       adding manifests
       adding file changes
       added 2 changesets with 2 changes to 1 files
Rose
% hg outgoing
       comparing with http://8.oasis.local:8000/
       searching for changes
       changeset:    2:689026657682
       tag:          tip
       user:         Rose M <rose@snda.com>
       date:         Mon Feb 08 15:29:09 2010 -0500

Rose   summary:      Spicier kind of chile.

       % hg push
       pushing to http://8.oasis.local:8000/
       searching for changes
       adding changesets
       adding manifests
       adding file changes
       added 1 changesets with 1 changes to 1 files
% hg outgoing
       comparing with http://8.oasis.local:8000/
       searching for changes
       changeset:    2:4ecdb2401ab4
       tag:          tip
       user:         Joel S <joel@snda.com>
       date:         Mon Feb 08 15:32:01 2010 -0500
       summary:      potato chips. No one can eat just one.
       % hg push
       pushing to http://8.oasis.local:8000/
       searching for changes
       abort: push creates new remote heads!
       (did you forget to merge? use push -f to force)


       % hg incoming

Joel   comparing with http://8.oasis.local:8000/
       searching for changes
       changeset:    3:689026657682
       tag:          tip
       parent:       1:a52881ed530d
       user:         Rose M <rose@example.com>
       date:         Mon Feb 08 15:29:09 2010 -0500
       summary:      spicier kind of chile
       % hg pull
       pulling from http://8.oasis.local:8000/
       searching for changes
       adding changesets
       adding manifests
       adding file changes
       added 1 changesets with 1 changes to 1 files (+1 heads)
       (run 'hg heads' to see heads, 'hg merge' to merge)
% hg merge
       merging guac
       0 files updated, 1 files merged, 0 files removed, 0
       files unresolved
       (branch merge, don't forget to commit)
       % hg commit -m "merge"
       % hg log
       changeset:   4:0849ca96c304
       tag:         tip
       parent:      2:4ecdb2401ab4
       parent:      3:689026657682
       user:        Joel S <joel@snda.com>
       date:        Mon Feb 08 16:07:23 2010 -0500
       summary:     merge

Joel   ... ...
       % hg out
       comparing with http://8.oasis.local:8000//
       searching for changes
       changeset:   2:4ecdb2401ab4
       ... ...
       changeset:   4:0849ca96c304
       ... ...
       % hg push
       pushing to http://8.oasis.local:8000/
       searching for changes
       adding changesets
       adding manifests
       adding file changes
       added 2 changesets with 2 changes to 1 files
Rose
  % hg pull
  pulling from http://8.oasis.local:8000/
  searching for changes
  adding changesets
  adding manifests
  adding file changes
  added 2 changesets with 2 changes to 1 files
  (run 'hg update' to get a working copy)


  % hg log


  % hg parent
  changeset:    2:689026657682
  user:         Rose H <rose@snda.com>
  date:         Mon Feb 08 15:29:09 2010 -0500
  summary:      spicier kind of chile


  % hg up
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
•
    •                 hg revert

    •                 hg rollback    commit pull


•
    •   hg clone project peoject-experiment
Backout
  % hg backout -m 'back out second change' tip

  % hg backout --merge -m 'Back out second change.' 1
  reverting myfile
  created new head
  changeset 3:abc7fd860049 backs out changeset 1:7e341ee3be7a
  merging with changeset 3:abc7fd860049
  merging myfile
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
  (branch merge, don't forget to commit)




1st change              2nd change                3rd change
                                                                         Automated
                                                                           merge
                                                 Back-out 2nd
                                                   change
•   code base

•           pull

•         push

•         merge

•
•
•   “   ”

•
•
Subversion → Mercurial/Git?



•
•    /
References

• Mercurial: The Definitive Guide
  by Bryan O'Sullivan, http://hgbook.red-bean.com/


• Hg Init: a Mercurial tutorial
  by Joel Spolsky, http://hginit.com/top/index.html


• Git for the Lazy
  by Spheriki, http://www.spheredev.org/wiki/Git_for_the_lazy


• PeepCode Git Internals
  by Scott Chacon
Contact Me



• neo.lee@gmail.com
• @soulhacker
•
Questions?

More Related Content

What's hot

Assemble Your Code in Stages: Leveling Up With Pipelines
Assemble Your Code in Stages: Leveling Up With PipelinesAssemble Your Code in Stages: Leveling Up With Pipelines
Assemble Your Code in Stages: Leveling Up With Pipelines
Steven Wade
 
Git github
Git githubGit github
Git github
Anurag Deb
 
Version Control and Git - GitHub Workshop
Version Control and Git - GitHub WorkshopVersion Control and Git - GitHub Workshop
Version Control and Git - GitHub Workshop
All Things Open
 
Spring I/O 2015 - Mum, I want to be a Groovy full-stack developer
Spring I/O 2015 - Mum, I want to be a Groovy full-stack developerSpring I/O 2015 - Mum, I want to be a Groovy full-stack developer
Spring I/O 2015 - Mum, I want to be a Groovy full-stack developer
Iván López Martín
 
Tool Time
Tool TimeTool Time
Tool Time
Ken Collins
 
slides.pdf
slides.pdfslides.pdf
slides.pdfvidsvagi
 
Juliette Reinders Folmer - Promote your open source project with GitHub Pages...
Juliette Reinders Folmer - Promote your open source project with GitHub Pages...Juliette Reinders Folmer - Promote your open source project with GitHub Pages...
Juliette Reinders Folmer - Promote your open source project with GitHub Pages...
Codemotion
 
Centralize your Business Logic with Pipelines in Elixir
Centralize your Business Logic with Pipelines in ElixirCentralize your Business Logic with Pipelines in Elixir
Centralize your Business Logic with Pipelines in Elixir
Michael Viveros
 

What's hot (10)

Gittalk
GittalkGittalk
Gittalk
 
Git real slides
Git real slidesGit real slides
Git real slides
 
Assemble Your Code in Stages: Leveling Up With Pipelines
Assemble Your Code in Stages: Leveling Up With PipelinesAssemble Your Code in Stages: Leveling Up With Pipelines
Assemble Your Code in Stages: Leveling Up With Pipelines
 
Git github
Git githubGit github
Git github
 
Version Control and Git - GitHub Workshop
Version Control and Git - GitHub WorkshopVersion Control and Git - GitHub Workshop
Version Control and Git - GitHub Workshop
 
Spring I/O 2015 - Mum, I want to be a Groovy full-stack developer
Spring I/O 2015 - Mum, I want to be a Groovy full-stack developerSpring I/O 2015 - Mum, I want to be a Groovy full-stack developer
Spring I/O 2015 - Mum, I want to be a Groovy full-stack developer
 
Tool Time
Tool TimeTool Time
Tool Time
 
slides.pdf
slides.pdfslides.pdf
slides.pdf
 
Juliette Reinders Folmer - Promote your open source project with GitHub Pages...
Juliette Reinders Folmer - Promote your open source project with GitHub Pages...Juliette Reinders Folmer - Promote your open source project with GitHub Pages...
Juliette Reinders Folmer - Promote your open source project with GitHub Pages...
 
Centralize your Business Logic with Pipelines in Elixir
Centralize your Business Logic with Pipelines in ElixirCentralize your Business Logic with Pipelines in Elixir
Centralize your Business Logic with Pipelines in Elixir
 

Viewers also liked

Ruby Past, Present, Future
Ruby   Past, Present, FutureRuby   Past, Present, Future
Ruby Past, Present, Future
adamfine
 
Jscex:案例、阻碍、体会、展望
Jscex:案例、阻碍、体会、展望Jscex:案例、阻碍、体会、展望
Jscex:案例、阻碍、体会、展望
jeffz
 
Web开发中的缓存
Web开发中的缓存Web开发中的缓存
Web开发中的缓存
jeffz
 
JavaScript现代化排错实践
JavaScript现代化排错实践JavaScript现代化排错实践
JavaScript现代化排错实践jeffz
 
LINQ Inside
LINQ InsideLINQ Inside
LINQ Insidejeffz
 
大话程序员可用的算法
大话程序员可用的算法大话程序员可用的算法
大话程序员可用的算法jeffz
 
The Evolution of Async Programming (GZ TechParty C#)
The Evolution of Async Programming (GZ TechParty C#)The Evolution of Async Programming (GZ TechParty C#)
The Evolution of Async Programming (GZ TechParty C#)jeffz
 
企业开发领域的语言特性
企业开发领域的语言特性企业开发领域的语言特性
企业开发领域的语言特性jeffz
 
QML 與 C++ 的美麗邂逅
QML 與 C++ 的美麗邂逅QML 與 C++ 的美麗邂逅
QML 與 C++ 的美麗邂逅
Jack Yang
 
Rabbit mq簡介(上)
Rabbit mq簡介(上)Rabbit mq簡介(上)
Rabbit mq簡介(上)
共和 薛
 
Storm特性
Storm特性Storm特性
Storm特性
zyh
 
鐵道女孩向前衝-RubyKaigi心得分享
鐵道女孩向前衝-RubyKaigi心得分享鐵道女孩向前衝-RubyKaigi心得分享
鐵道女孩向前衝-RubyKaigi心得分享
Yu-Chen Chen
 
LWC15 典藏數位化-張其昀先生相關資料數位化之應用 報告人:中國文化大學圖書館 吳瑞秀館長
LWC15 典藏數位化-張其昀先生相關資料數位化之應用 報告人:中國文化大學圖書館 吳瑞秀館長LWC15 典藏數位化-張其昀先生相關資料數位化之應用 報告人:中國文化大學圖書館 吳瑞秀館長
LWC15 典藏數位化-張其昀先生相關資料數位化之應用 報告人:中國文化大學圖書館 吳瑞秀館長
International Federation for information integration
 
使用.NET构建轻量级分布式框架
使用.NET构建轻量级分布式框架使用.NET构建轻量级分布式框架
使用.NET构建轻量级分布式框架jeffz
 
臺北智慧城市專案辦公室公共住宅智慧社區服務說明書工作會議--智慧圖書館
臺北智慧城市專案辦公室公共住宅智慧社區服務說明書工作會議--智慧圖書館臺北智慧城市專案辦公室公共住宅智慧社區服務說明書工作會議--智慧圖書館
臺北智慧城市專案辦公室公共住宅智慧社區服務說明書工作會議--智慧圖書館
Taipei Smart City PMO
 
我編譯故我在:誰說 Node.js 程式不能編成 binary
我編譯故我在:誰說 Node.js 程式不能編成 binary我編譯故我在:誰說 Node.js 程式不能編成 binary
我編譯故我在:誰說 Node.js 程式不能編成 binaryFred Chien
 
LWC14夢醒時分:圖書館建築構想書的實踐成果 以國立臺東大學圖書館為例。報告人:國立臺東大學圖書館 吳錦範組長
LWC14夢醒時分:圖書館建築構想書的實踐成果 以國立臺東大學圖書館為例。報告人:國立臺東大學圖書館 吳錦範組長LWC14夢醒時分:圖書館建築構想書的實踐成果 以國立臺東大學圖書館為例。報告人:國立臺東大學圖書館 吳錦範組長
LWC14夢醒時分:圖書館建築構想書的實踐成果 以國立臺東大學圖書館為例。報告人:國立臺東大學圖書館 吳錦範組長
International Federation for information integration
 
Brig:Node.js + QML 華麗大冒險
Brig:Node.js + QML 華麗大冒險Brig:Node.js + QML 華麗大冒險
Brig:Node.js + QML 華麗大冒險
Fred Chien
 
計概:Programming Paradigm
計概:Programming Paradigm計概:Programming Paradigm
計概:Programming Paradigm
Rex Yuan
 
新時代圖書館大未來
新時代圖書館大未來新時代圖書館大未來
新時代圖書館大未來
Ted Lin (林泰宏)
 

Viewers also liked (20)

Ruby Past, Present, Future
Ruby   Past, Present, FutureRuby   Past, Present, Future
Ruby Past, Present, Future
 
Jscex:案例、阻碍、体会、展望
Jscex:案例、阻碍、体会、展望Jscex:案例、阻碍、体会、展望
Jscex:案例、阻碍、体会、展望
 
Web开发中的缓存
Web开发中的缓存Web开发中的缓存
Web开发中的缓存
 
JavaScript现代化排错实践
JavaScript现代化排错实践JavaScript现代化排错实践
JavaScript现代化排错实践
 
LINQ Inside
LINQ InsideLINQ Inside
LINQ Inside
 
大话程序员可用的算法
大话程序员可用的算法大话程序员可用的算法
大话程序员可用的算法
 
The Evolution of Async Programming (GZ TechParty C#)
The Evolution of Async Programming (GZ TechParty C#)The Evolution of Async Programming (GZ TechParty C#)
The Evolution of Async Programming (GZ TechParty C#)
 
企业开发领域的语言特性
企业开发领域的语言特性企业开发领域的语言特性
企业开发领域的语言特性
 
QML 與 C++ 的美麗邂逅
QML 與 C++ 的美麗邂逅QML 與 C++ 的美麗邂逅
QML 與 C++ 的美麗邂逅
 
Rabbit mq簡介(上)
Rabbit mq簡介(上)Rabbit mq簡介(上)
Rabbit mq簡介(上)
 
Storm特性
Storm特性Storm特性
Storm特性
 
鐵道女孩向前衝-RubyKaigi心得分享
鐵道女孩向前衝-RubyKaigi心得分享鐵道女孩向前衝-RubyKaigi心得分享
鐵道女孩向前衝-RubyKaigi心得分享
 
LWC15 典藏數位化-張其昀先生相關資料數位化之應用 報告人:中國文化大學圖書館 吳瑞秀館長
LWC15 典藏數位化-張其昀先生相關資料數位化之應用 報告人:中國文化大學圖書館 吳瑞秀館長LWC15 典藏數位化-張其昀先生相關資料數位化之應用 報告人:中國文化大學圖書館 吳瑞秀館長
LWC15 典藏數位化-張其昀先生相關資料數位化之應用 報告人:中國文化大學圖書館 吳瑞秀館長
 
使用.NET构建轻量级分布式框架
使用.NET构建轻量级分布式框架使用.NET构建轻量级分布式框架
使用.NET构建轻量级分布式框架
 
臺北智慧城市專案辦公室公共住宅智慧社區服務說明書工作會議--智慧圖書館
臺北智慧城市專案辦公室公共住宅智慧社區服務說明書工作會議--智慧圖書館臺北智慧城市專案辦公室公共住宅智慧社區服務說明書工作會議--智慧圖書館
臺北智慧城市專案辦公室公共住宅智慧社區服務說明書工作會議--智慧圖書館
 
我編譯故我在:誰說 Node.js 程式不能編成 binary
我編譯故我在:誰說 Node.js 程式不能編成 binary我編譯故我在:誰說 Node.js 程式不能編成 binary
我編譯故我在:誰說 Node.js 程式不能編成 binary
 
LWC14夢醒時分:圖書館建築構想書的實踐成果 以國立臺東大學圖書館為例。報告人:國立臺東大學圖書館 吳錦範組長
LWC14夢醒時分:圖書館建築構想書的實踐成果 以國立臺東大學圖書館為例。報告人:國立臺東大學圖書館 吳錦範組長LWC14夢醒時分:圖書館建築構想書的實踐成果 以國立臺東大學圖書館為例。報告人:國立臺東大學圖書館 吳錦範組長
LWC14夢醒時分:圖書館建築構想書的實踐成果 以國立臺東大學圖書館為例。報告人:國立臺東大學圖書館 吳錦範組長
 
Brig:Node.js + QML 華麗大冒險
Brig:Node.js + QML 華麗大冒險Brig:Node.js + QML 華麗大冒險
Brig:Node.js + QML 華麗大冒險
 
計概:Programming Paradigm
計概:Programming Paradigm計概:Programming Paradigm
計概:Programming Paradigm
 
新時代圖書館大未來
新時代圖書館大未來新時代圖書館大未來
新時代圖書館大未來
 

Similar to 分布式版本管理

Git vs. Mercurial
Git vs. MercurialGit vs. Mercurial
Git vs. Mercurial
Marian Marinov
 
Introduction to Git for Artists
Introduction to Git for ArtistsIntroduction to Git for Artists
Introduction to Git for Artists
David Newbury
 
Git workflows automat-it
Git workflows automat-itGit workflows automat-it
Git workflows automat-it
Automat-IT
 
Take the next step with git
Take the next step with gitTake the next step with git
Take the next step with git
Karin Taliga
 
Git Distributed Version Control System
Git   Distributed Version Control SystemGit   Distributed Version Control System
Git Distributed Version Control SystemVictor Wong
 
Fun with Github webhooks: verifying Signed-off-by
Fun with Github webhooks: verifying Signed-off-byFun with Github webhooks: verifying Signed-off-by
Fun with Github webhooks: verifying Signed-off-by
Jeff Squyres
 
Matt Gauger - Git & Github web414 December 2010
Matt Gauger - Git & Github web414 December 2010Matt Gauger - Git & Github web414 December 2010
Matt Gauger - Git & Github web414 December 2010
Matt Gauger
 
Git basics with notes
Git basics with notesGit basics with notes
Git basics with notes
Surabhi Gupta
 
Lagos GitHub Meetup - What is Git?
Lagos GitHub Meetup - What is Git?Lagos GitHub Meetup - What is Git?
Lagos GitHub Meetup - What is Git?
Celestine Omin
 
Working with multiple git repositories
Working with multiple git repositoriesWorking with multiple git repositories
Working with multiple git repositories
Julien Pivotto
 
Git Basics (Professionals)
 Git Basics (Professionals) Git Basics (Professionals)
Git Basics (Professionals)
bryanbibat
 
Git_real_slides
Git_real_slidesGit_real_slides
Git_real_slides
Khanh NL-bantoilatoi
 
Getting Into Git
Getting Into GitGetting Into Git
Getting Into Git
Rick Umali
 
Git - (a) Gentle InTroduction
Git - (a) Gentle InTroductionGit - (a) Gentle InTroduction
Git - (a) Gentle InTroduction
Bruno Bossola
 
Working with Git
Working with GitWorking with Git
Working with Git
Sanghoon Hong
 
The everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitThe everyday developer's guide to version control with Git
The everyday developer's guide to version control with Git
E Carter
 
Git and github introduction
Git and github introductionGit and github introduction
Git and github introduction
John(Qiang) Zhang
 
Git Acquainted
Git AcquaintedGit Acquainted
Git Acquainted
tylerhunt
 
Git: Why And How to
Git: Why And How toGit: Why And How to
Git: Why And How to
lanhuonga3
 

Similar to 分布式版本管理 (20)

Git vs. Mercurial
Git vs. MercurialGit vs. Mercurial
Git vs. Mercurial
 
Mercurial
MercurialMercurial
Mercurial
 
Introduction to Git for Artists
Introduction to Git for ArtistsIntroduction to Git for Artists
Introduction to Git for Artists
 
Git workflows automat-it
Git workflows automat-itGit workflows automat-it
Git workflows automat-it
 
Take the next step with git
Take the next step with gitTake the next step with git
Take the next step with git
 
Git Distributed Version Control System
Git   Distributed Version Control SystemGit   Distributed Version Control System
Git Distributed Version Control System
 
Fun with Github webhooks: verifying Signed-off-by
Fun with Github webhooks: verifying Signed-off-byFun with Github webhooks: verifying Signed-off-by
Fun with Github webhooks: verifying Signed-off-by
 
Matt Gauger - Git & Github web414 December 2010
Matt Gauger - Git & Github web414 December 2010Matt Gauger - Git & Github web414 December 2010
Matt Gauger - Git & Github web414 December 2010
 
Git basics with notes
Git basics with notesGit basics with notes
Git basics with notes
 
Lagos GitHub Meetup - What is Git?
Lagos GitHub Meetup - What is Git?Lagos GitHub Meetup - What is Git?
Lagos GitHub Meetup - What is Git?
 
Working with multiple git repositories
Working with multiple git repositoriesWorking with multiple git repositories
Working with multiple git repositories
 
Git Basics (Professionals)
 Git Basics (Professionals) Git Basics (Professionals)
Git Basics (Professionals)
 
Git_real_slides
Git_real_slidesGit_real_slides
Git_real_slides
 
Getting Into Git
Getting Into GitGetting Into Git
Getting Into Git
 
Git - (a) Gentle InTroduction
Git - (a) Gentle InTroductionGit - (a) Gentle InTroduction
Git - (a) Gentle InTroduction
 
Working with Git
Working with GitWorking with Git
Working with Git
 
The everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitThe everyday developer's guide to version control with Git
The everyday developer's guide to version control with Git
 
Git and github introduction
Git and github introductionGit and github introduction
Git and github introduction
 
Git Acquainted
Git AcquaintedGit Acquainted
Git Acquainted
 
Git: Why And How to
Git: Why And How toGit: Why And How to
Git: Why And How to
 

More from jeffz

Wind.js无障碍调试与排错
Wind.js无障碍调试与排错Wind.js无障碍调试与排错
Wind.js无障碍调试与排错jeffz
 
Jscex:案例、经验、阻碍、展望
Jscex:案例、经验、阻碍、展望Jscex:案例、经验、阻碍、展望
Jscex:案例、经验、阻碍、展望jeffz
 
深入浅出Jscex
深入浅出Jscex深入浅出Jscex
深入浅出Jscexjeffz
 
Mono for .NET Developers
Mono for .NET DevelopersMono for .NET Developers
Mono for .NET Developersjeffz
 
Javascript Uncommon Programming
Javascript Uncommon ProgrammingJavascript Uncommon Programming
Javascript Uncommon Programmingjeffz
 
Jscex: Write Sexy JavaScript (中文)
Jscex: Write Sexy JavaScript (中文)Jscex: Write Sexy JavaScript (中文)
Jscex: Write Sexy JavaScript (中文)jeffz
 
Jscex: Write Sexy JavaScript
Jscex: Write Sexy JavaScriptJscex: Write Sexy JavaScript
Jscex: Write Sexy JavaScriptjeffz
 
单点登录解决方案的架构与实现
单点登录解决方案的架构与实现单点登录解决方案的架构与实现
单点登录解决方案的架构与实现jeffz
 
Documentation Insight技术架构与开发历程
Documentation Insight技术架构与开发历程Documentation Insight技术架构与开发历程
Documentation Insight技术架构与开发历程jeffz
 
Windows Phone应用开发心得
Windows Phone应用开发心得Windows Phone应用开发心得
Windows Phone应用开发心得jeffz
 
针对iPad平台的高性能网站架构
针对iPad平台的高性能网站架构针对iPad平台的高性能网站架构
针对iPad平台的高性能网站架构jeffz
 
The Evolution of Async-Programming on .NET Platform (TUP, Full)
The Evolution of Async-Programming on .NET Platform (TUP, Full)The Evolution of Async-Programming on .NET Platform (TUP, Full)
The Evolution of Async-Programming on .NET Platform (TUP, Full)jeffz
 
The Evolution of Async-Programming on .NET Platform (.Net China, C#)
The Evolution of Async-Programming on .NET Platform (.Net China, C#)The Evolution of Async-Programming on .NET Platform (.Net China, C#)
The Evolution of Async-Programming on .NET Platform (.Net China, C#)jeffz
 
The Evolution of Async-Programming (SD 2.0, JavaScript)
The Evolution of Async-Programming (SD 2.0, JavaScript)The Evolution of Async-Programming (SD 2.0, JavaScript)
The Evolution of Async-Programming (SD 2.0, JavaScript)jeffz
 
面向对象与生活
面向对象与生活面向对象与生活
面向对象与生活jeffz
 
Windows内核技术介绍
Windows内核技术介绍Windows内核技术介绍
Windows内核技术介绍jeffz
 
响应式编程及框架
响应式编程及框架响应式编程及框架
响应式编程及框架
jeffz
 
F#语言对异步程序设计的支持
F#语言对异步程序设计的支持F#语言对异步程序设计的支持
F#语言对异步程序设计的支持
jeffz
 
大众点评网的技术变迁之路
大众点评网的技术变迁之路大众点评网的技术变迁之路
大众点评网的技术变迁之路
jeffz
 
Better Framework Better Life
Better Framework Better LifeBetter Framework Better Life
Better Framework Better Life
jeffz
 

More from jeffz (20)

Wind.js无障碍调试与排错
Wind.js无障碍调试与排错Wind.js无障碍调试与排错
Wind.js无障碍调试与排错
 
Jscex:案例、经验、阻碍、展望
Jscex:案例、经验、阻碍、展望Jscex:案例、经验、阻碍、展望
Jscex:案例、经验、阻碍、展望
 
深入浅出Jscex
深入浅出Jscex深入浅出Jscex
深入浅出Jscex
 
Mono for .NET Developers
Mono for .NET DevelopersMono for .NET Developers
Mono for .NET Developers
 
Javascript Uncommon Programming
Javascript Uncommon ProgrammingJavascript Uncommon Programming
Javascript Uncommon Programming
 
Jscex: Write Sexy JavaScript (中文)
Jscex: Write Sexy JavaScript (中文)Jscex: Write Sexy JavaScript (中文)
Jscex: Write Sexy JavaScript (中文)
 
Jscex: Write Sexy JavaScript
Jscex: Write Sexy JavaScriptJscex: Write Sexy JavaScript
Jscex: Write Sexy JavaScript
 
单点登录解决方案的架构与实现
单点登录解决方案的架构与实现单点登录解决方案的架构与实现
单点登录解决方案的架构与实现
 
Documentation Insight技术架构与开发历程
Documentation Insight技术架构与开发历程Documentation Insight技术架构与开发历程
Documentation Insight技术架构与开发历程
 
Windows Phone应用开发心得
Windows Phone应用开发心得Windows Phone应用开发心得
Windows Phone应用开发心得
 
针对iPad平台的高性能网站架构
针对iPad平台的高性能网站架构针对iPad平台的高性能网站架构
针对iPad平台的高性能网站架构
 
The Evolution of Async-Programming on .NET Platform (TUP, Full)
The Evolution of Async-Programming on .NET Platform (TUP, Full)The Evolution of Async-Programming on .NET Platform (TUP, Full)
The Evolution of Async-Programming on .NET Platform (TUP, Full)
 
The Evolution of Async-Programming on .NET Platform (.Net China, C#)
The Evolution of Async-Programming on .NET Platform (.Net China, C#)The Evolution of Async-Programming on .NET Platform (.Net China, C#)
The Evolution of Async-Programming on .NET Platform (.Net China, C#)
 
The Evolution of Async-Programming (SD 2.0, JavaScript)
The Evolution of Async-Programming (SD 2.0, JavaScript)The Evolution of Async-Programming (SD 2.0, JavaScript)
The Evolution of Async-Programming (SD 2.0, JavaScript)
 
面向对象与生活
面向对象与生活面向对象与生活
面向对象与生活
 
Windows内核技术介绍
Windows内核技术介绍Windows内核技术介绍
Windows内核技术介绍
 
响应式编程及框架
响应式编程及框架响应式编程及框架
响应式编程及框架
 
F#语言对异步程序设计的支持
F#语言对异步程序设计的支持F#语言对异步程序设计的支持
F#语言对异步程序设计的支持
 
大众点评网的技术变迁之路
大众点评网的技术变迁之路大众点评网的技术变迁之路
大众点评网的技术变迁之路
 
Better Framework Better Life
Better Framework Better LifeBetter Framework Better Life
Better Framework Better Life
 

Recently uploaded

UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 

Recently uploaded (20)

UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 

分布式版本管理

  • 2. • Visual SourceSafe • CVS/Subversion/TFS/etc. • Git/Mercurial/Bazaar/etc.
  • 4.
  • 6. or •
  • 7.
  • 8.
  • 9.
  • 10. CVS/SVN/etc. Git/Mercurial/etc. revision changeset
  • 11. ≠ • merge •
  • 12.
  • 14. % hg Mercurial Distributed SCM basic commands: add add the specified files on the next commit annotate show changeset information by line for each file clone make a copy of an existing repository commit commit the specified files or all outstanding changes diff diff repository (or selected files) export dump the header and diffs for one or more changesets forget forget the specified files on the next commit init create a new repository in the given directory log show revision history of entire repository or files merge merge working directory with another revision pull pull changes from the specified source push push changes to the specified destination remove remove the specified files on the next commit serve start stand-alone webserver status show changed files in the working directory summary summarize working directory state update update working directory (or switch revisions) use "hg help" for the full list of commands or "hg -v" for details
  • 15. % pwd /Users/neo/Code/Repo/hginit % ll total 24 drwxr-xr-x 5 neo staff 170 Aug 7 13:13 . drwxr-xr-x 12 neo staff 408 Aug 7 13:11 .. -rw-r--r--@ 1 neo staff 1605 Jun 26 12:23 Info.plist -rw-r--r--@ 1 neo staff 2907 Jun 19 16:18 global.html -rw-r--r-- 1 neo staff 1183 Jun 12 16:22 link.png % hg init % ll total 24 drwxr-xr-x 6 neo staff 204 Aug 7 13:14 . drwxr-xr-x 12 neo staff 408 Aug 7 13:11 .. drwxr-xr-x 5 neo staff 170 Aug 7 13:14 .hg -rw-r--r--@ 1 neo staff 1605 Jun 26 12:23 Info.plist -rw-r--r--@ 1 neo staff 2907 Jun 19 16:18 global.html -rw-r--r-- 1 neo staff 1183 Jun 12 16:22 link.png
  • 16. % hg add adding Info.plist adding global.html adding link.png % hg commit % hg log changeset: 0:0ae94e57c184 % hg commit tag: tip Info.plist user: "Neo Lee <neo.lee at gmail.com>" global.html date: Sat Aug 07 14:43:24 2010 +0800 link.png files: Info.plist global.html link.png committed changeset 0:0ae94e57c184 description: Init commit.
  • 17.
  • 18. % hg commit % hg log changeset: 1:dc12cb350527 tag: tip user: "Neo Lee <neo.lee at gmail.com>" date: Sat Aug 07 14:54:57 2010 +0800 files: global.html description: Capitalize 'ERROR' prompt. changeset: 0:0ae94e57c184 user: "Neo Lee <neo.lee at gmail.com>" date: Sat Aug 07 14:43:24 2010 +0800 files: Info.plist global.html link.png description: Init commit.
  • 19. % rm Info.plist % rm link.png % e global.html % % hg revert --all reverting Info.plist reverting link.png reverting global.html
  • 20. 1. 2. 3. commit 4. revert 5. (1)
  • 21. % cp Info.plist Info.plist.1 % e Info.plist % rm link.png remove link.png? y % hg status M Info.plist ! link.png ? Info.plist.1 % hg diff Info.plist diff -r dc12cb350527 Info.plist --- a/Info.plist Sat Aug 07 14:54:57 2010 +0800 +++ b/Info.plist Sat Aug 07 15:07:18 2010 +0800 @@ -3,7 +3,7 @@ <plist version="1.0"> <dict> <key>Author</key> - <string>Neo Lee</string> + <string>Li Jun</string> <key>CFBundleDisplayName</key> <string>Goo.gl</string> <key>CFBundleIdentifier</key>
  • 22. % hg log changeset: 2:5ba69dac6378 tag: tip user: "Neo Lee <neo.lee at gmail.com>" % hg remove link.png date: Sat Aug 07 15:10:02 2010 +0800 removing link.png files: Info.plist Info.plist.1 link.png description: % hg status Some dirty work! M Info.plist R link.png ? Info.plist.1 changeset: 1:dc12cb350527 user: "Neo Lee <neo.lee at gmail.com>" % hg add date: Sat Aug 07 14:54:57 2010 +0800 adding Info.plist.1 files: global.html description: % hg st Capitalize 'ERROR' prompt. M Info.plist A Info.plist.1 R link.png changeset: 0:0ae94e57c184 user: "Neo Lee <neo.lee at gmail.com>" % hg commit date: Sat Aug 07 14:43:24 2010 +0800 files: Info.plist global.html link.png description: Init commit.
  • 23. % hg cat Info.plist % hg cat -r 0 Info.plist % hg diff -r 0:1 Info.plist % hg update -r 0 % hg up -r 1 % hg up
  • 24.
  • 25. % mkdir repo % cd repo % hg init % hg serve listening at http://8.oasis.local:8000/ (bound to *:8000)
  • 26. % hg clone http://8.oasis.local:8000/ working no changes found updating to branch default resolving manifests 0 files updated, 0 files merged, 0 files removed, 0 files unresolved % cd working % ll total 0 drwxr-xr-x 3 neo staff 102 Aug 7 15:49 . drwxr-xr-x 4 neo staff 136 Aug 7 15:49 .. drwxr-xr-x 8 neo staff 272 Aug 7 15:49 .hg
  • 27. % hg push Joel pushing to http://8.oasis.local:8000/ searching for changes adding changesets adding manifests adding file changes added 2 changesets with 2 changes to 1 files
  • 28.
  • 29. Rose
  • 30. % hg outgoing comparing with http://8.oasis.local:8000/ searching for changes changeset: 2:689026657682 tag: tip user: Rose M <rose@snda.com> date: Mon Feb 08 15:29:09 2010 -0500 Rose summary: Spicier kind of chile. % hg push pushing to http://8.oasis.local:8000/ searching for changes adding changesets adding manifests adding file changes added 1 changesets with 1 changes to 1 files
  • 31. % hg outgoing comparing with http://8.oasis.local:8000/ searching for changes changeset: 2:4ecdb2401ab4 tag: tip user: Joel S <joel@snda.com> date: Mon Feb 08 15:32:01 2010 -0500 summary: potato chips. No one can eat just one. % hg push pushing to http://8.oasis.local:8000/ searching for changes abort: push creates new remote heads! (did you forget to merge? use push -f to force) % hg incoming Joel comparing with http://8.oasis.local:8000/ searching for changes changeset: 3:689026657682 tag: tip parent: 1:a52881ed530d user: Rose M <rose@example.com> date: Mon Feb 08 15:29:09 2010 -0500 summary: spicier kind of chile % hg pull pulling from http://8.oasis.local:8000/ searching for changes adding changesets adding manifests adding file changes added 1 changesets with 1 changes to 1 files (+1 heads) (run 'hg heads' to see heads, 'hg merge' to merge)
  • 32. % hg merge merging guac 0 files updated, 1 files merged, 0 files removed, 0 files unresolved (branch merge, don't forget to commit) % hg commit -m "merge" % hg log changeset: 4:0849ca96c304 tag: tip parent: 2:4ecdb2401ab4 parent: 3:689026657682 user: Joel S <joel@snda.com> date: Mon Feb 08 16:07:23 2010 -0500 summary: merge Joel ... ... % hg out comparing with http://8.oasis.local:8000// searching for changes changeset: 2:4ecdb2401ab4 ... ... changeset: 4:0849ca96c304 ... ... % hg push pushing to http://8.oasis.local:8000/ searching for changes adding changesets adding manifests adding file changes added 2 changesets with 2 changes to 1 files
  • 33. Rose % hg pull pulling from http://8.oasis.local:8000/ searching for changes adding changesets adding manifests adding file changes added 2 changesets with 2 changes to 1 files (run 'hg update' to get a working copy) % hg log % hg parent changeset: 2:689026657682 user: Rose H <rose@snda.com> date: Mon Feb 08 15:29:09 2010 -0500 summary: spicier kind of chile % hg up 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
  • 34. • hg revert • hg rollback commit pull • • hg clone project peoject-experiment
  • 35.
  • 36. Backout % hg backout -m 'back out second change' tip % hg backout --merge -m 'Back out second change.' 1 reverting myfile created new head changeset 3:abc7fd860049 backs out changeset 1:7e341ee3be7a merging with changeset 3:abc7fd860049 merging myfile 0 files updated, 1 files merged, 0 files removed, 0 files unresolved (branch merge, don't forget to commit) 1st change 2nd change 3rd change Automated merge Back-out 2nd change
  • 37. code base • pull • push • merge •
  • 38.
  • 39.
  • 40.
  • 41.
  • 42. • • “ ” • •
  • 44. References • Mercurial: The Definitive Guide by Bryan O'Sullivan, http://hgbook.red-bean.com/ • Hg Init: a Mercurial tutorial by Joel Spolsky, http://hginit.com/top/index.html • Git for the Lazy by Spheriki, http://www.spheredev.org/wiki/Git_for_the_lazy • PeepCode Git Internals by Scott Chacon