Visit Bitbucket.orgBitbucket.org can hostcode repositories.Public repositories arefree. Privaterepositories are free ifsha...
Log in asgramenerClick on the “Log in”link at the top to log in.The username is“gramener”.The password can beobtained from...
Start a projectIf you’re starting a newproject, click on the“create repository” linkon the top right.
Fill in the detailsType a project NameSelect PrivateChoose MercurialSelect Issue trackingSelect WikiChoose LanguageType a ...
Visit the siteThe repository is nowcreated.It can be accessed athttps://bitbucket.org/gramener/<name>Currently, it contain...
Clone a projectFirst, install cygwinwith Mercural (hg)selected.Clone an existing ornewly created projectby typing on theco...
Add filesCreate or copy theproject files into thecloned repository.Here, I am copying filesI already created intothe repos...
Commit changeshg status tells you thestatus of each file.Now, nothing’stracked.hg add file tells hg youwant to commit file...
Push changeshg push tells hg tosend the changes tobitbucket.Only at this point willothers be able to seeyour change.This m...
Changes pushedAfter hg push, you willbe able to see yourfiles on bitbucket.org
Email notificationYou can receive a mailwhen someonecommits a change.In Admin, click onServices, and chooseEmail.Type in y...
Ignore filesIf you want to ignorespecific files, create a.hgignore file.Type in a list of regularexpressions matchingthe f...
Pull changes firstBefore committingfiles, first pull otherpeople’s changes intoyour repository.ALWAYS.hg pull copies themf...
Add / change fileshg add any new files tothe repository.hg commit any existingor newly added files tothe local repository....
View differencesOn bitbucket, you canbrowse and see theexact lines that werechanged in everycommit.
Upcoming SlideShare
Loading in …5
×

Using Bitbucket and Mercurial

783 views
686 views

Published on

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

No Downloads
Views
Total views
783
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
11
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Using Bitbucket and Mercurial

  1. 1. Visit Bitbucket.orgBitbucket.org can hostcode repositories.Public repositories arefree. Privaterepositories are free ifsharing with up to 5people.Bitbucket usesMercurial (hg) as wellas git for versioncontrol.We will use Mercurial.
  2. 2. Log in asgramenerClick on the “Log in”link at the top to log in.The username is“gramener”.The password can beobtained froms.anand@gramener.com
  3. 3. Start a projectIf you’re starting a newproject, click on the“create repository” linkon the top right.
  4. 4. Fill in the detailsType a project NameSelect PrivateChoose MercurialSelect Issue trackingSelect WikiChoose LanguageType a DescriptionOptionally, add aWebsite
  5. 5. Visit the siteThe repository is nowcreated.It can be accessed athttps://bitbucket.org/gramener/<name>Currently, it containsno data
  6. 6. Clone a projectFirst, install cygwinwith Mercural (hg)selected.Clone an existing ornewly created projectby typing on thecommand prompt:hg clone <project-url>This may ask you foryour ID (gramener) andyour password.
  7. 7. Add filesCreate or copy theproject files into thecloned repository.Here, I am copying filesI already created intothe repository.You may use WindowsExplorer to copy, orNotepad++ to create.Any other tool is fineas well.
  8. 8. Commit changeshg status tells you thestatus of each file.Now, nothing’stracked.hg add file tells hg youwant to commit file. Ithas not yet committedhg commit commitsonly added files intothe local repository.Bitbucket still doesn’tknow of this yet.
  9. 9. Push changeshg push tells hg tosend the changes tobitbucket.Only at this point willothers be able to seeyour change.This means that youcan commit changesoffline, locally, andpush all your localcommits when you goonline.
  10. 10. Changes pushedAfter hg push, you willbe able to see yourfiles on bitbucket.org
  11. 11. Email notificationYou can receive a mailwhen someonecommits a change.In Admin, click onServices, and chooseEmail.Type in your email IDand Save settings.
  12. 12. Ignore filesIf you want to ignorespecific files, create a.hgignore file.Type in a list of regularexpressions matchingthe files to ignore.abc$ matches all filesending with abc. ($stands for the end.)
  13. 13. Pull changes firstBefore committingfiles, first pull otherpeople’s changes intoyour repository.ALWAYS.hg pull copies themfrom bitbucket to thelocal repository.hg update copies fromlocal repository to yourfolder.YOU MUST RUN BOTH
  14. 14. Add / change fileshg add any new files tothe repository.hg commit any existingor newly added files tothe local repository.Make sure you type adescriptive messagewith –m"…"hg push committedchanges to bitbucket.
  15. 15. View differencesOn bitbucket, you canbrowse and see theexact lines that werechanged in everycommit.

×