Wednesday, April 27, 2011
Monday, April 25, 2011
Mercurial(hg) started with Bitbucket Repository
The article was first published in http://confluence.atlassian.com/display/BITBUCKET/Getting+Started+with+Bitbucket
Quick guide to getting your Bitbucket repository up and running
Quick guide to getting your Bitbucket repository up and running
- Sign up at Bitbucket.org.
- If you want to add a new repository on Bitbucket, click 'Create new' on your Bitbucket home screen.
- Get Mercurial and Python.
(Alternatively, if you are on Windows you can download and install TortoiseHg. This bundles Python and Mercurial.) - Add or edit your Mercurial config file at C:\Documents and Settings\MY_NAME\mercurial.ini (Windows XP) orC:\Users\MY_NAME\mercurial.ini (Windows 7) or ~/.hgrc (UNIX). The file should contain:
[ui] ; editor used to enter commit logs, etc. Most text editors will work. editor = notepad username = MY_FIRST_NAME MY_LAST_NAME <MY_NAME@example.com>
- Go to a directory on your local drive and clone your Bitbucket repository:
hg clone http://bitbucket.org/MY_USER/MY_REPO
- Update your local repository:
- Add files then enter hg add.
- Edit files.
- Delete files then enter hg remove.
- Commit your changes to the local repository:
hg commit -m "Initial commit of all files to the repository."
- Push your changes to Bitbucket:
hg push http://bitbucket.org/MY_USER/MY_REPO
- Have a chocolate.
P.S. About the remove, it seems like you need to remove the file individually, for my part, I used hg status to know the change, and then append the file name after hg remove. Don't forget commit and push.
New: If you want to remove a folder with files, you could go to the parent folder, for example, folder pro3/FileRepo is the one you want to remove, you should under pro3, and then enter "hg remove FileRepo", see hg status to see if succeed, and then commit and push.
All the "remove" I used means remove the files in Bitbucket.org Repo.
New: If you want to remove a folder with files, you could go to the parent folder, for example, folder pro3/FileRepo is the one you want to remove, you should under pro3, and then enter "hg remove FileRepo", see hg status to see if succeed, and then commit and push.
All the "remove" I used means remove the files in Bitbucket.org Repo.
Subscribe to:
Posts (Atom)