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.
Log in asgramenerClick on the “Log in”link at the top to log in.The username is“gramener”.The password can beobtained email@example.com
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 DescriptionOptionally, add aWebsite
Visit the siteThe repository is nowcreated.It can be accessed athttps://bitbucket.org/gramener/<name>Currently, it containsno data
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.
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.
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.
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.
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 your email IDand Save settings.
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.)
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
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.
View differencesOn bitbucket, you canbrowse and see theexact lines that werechanged in everycommit.