Introduction to mercurial

1,257 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,257
On SlideShare
0
From Embeds
0
Number of Embeds
427
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Introduction to mercurial

  1. 1. Mercurial is not a chemical element. Are you curios what is it?
  2. 2. Who am I?Ivan Ostafiychuk <iostaf@gmail.com>,Software EngeenerWorking at SoftServe Inc.
  3. 3. What is a Mercurial?● Distributed Version Control System like Git, Bazaar and others● Mercurial was created by Matt Mackall in April 19, 2005● The latest stable 2.1 is released February 1, 2012 (3 days ago)
  4. 4. Getting StartedHow can you get it?● Windows Get it from http://tortoisehg.bitbucket.org/● Linux Ubuntu: $ apt-get install mercurial Fedora: $ yum install mercurial Gentoo: $ emerge mercurialMac OS Xhttp://mercurial.berkwood.com/
  5. 5. Start Tour: Initial setup$ cat .hgrc[ui]username = Ivan Ostafiychuk <iostaf@gmail.com>
  6. 6. Start Tour: Daily commandsCommand Descriptionhelp <cmd> Built-in help systeminit Create empty repositoryadd Mark files to be added to repository Mark files to be removed fromremove (rm) repositorycommit (ci) Commit your changes to repositorystatus (st) Show your changeshistory (log) Show your changes
  7. 7. Start Tour: Example$ cd ~$ mkdir my-cool-project$ cd my-cool-project$ vi main.c$ hg add main.c$ hg ci -m "Initial commit."$ vi main.c$ hg ci -m "Refactored a bit"
  8. 8. TeamWork: commandsCommand Descriptionclone Make a copy of your repositorypull Pull changes from another repository into yourspull -u Performs the same as pull but also updates working directorypush Push your changes into another repositorymerge Merge working directory with another revision
  9. 9. TeamWork: Example$ mv my-cool-project john@my-cool-project$ hg clone john@my-cool-project bob@my-cool-project$ cd bob@my-cool-project$ # doing our stuf here (e.g. changes, commits)$ # BUT john also developed some awesomefeature and we want it NOW$ hg pull -u ../john@my-cool-project$ hg merge && hg ci -m"Synced with John."
  10. 10. TeamWork: Merging
  11. 11. Branching: Clones
  12. 12. Branching: Named branches
  13. 13. Branching: Bookmarks
  14. 14. BitBucket.org● Free hosting for Mercurial and Git● Unlimited repositories in terms of size and count● Wiki & Issue Tracker● Support for fork and pull model
  15. 15. Questions
  16. 16. References1. http://mercurial.selenic.com/2. https://bitbucket.org/3. http://ilovemercurial.com/4. http://www.fogcreek.com/kiln/5. http://hginit.com/6. http://hgbook.red-bean.com/read/7. http://mercurial.selenic. com/wiki/HgSubversion

×