11

I know there's a certain plugin, but I've never played with git plugins nor am that good with git. I just use rather simple workflow.

So, my question goes. How can I, (in simple terms if it's not a problem), upload a git project to BitBucket ?

If you know of any web tutorials that cover this, that would be equally good.

Rook
  • 60,248
  • 49
  • 165
  • 242
  • possible duplicate of [Git interoperability with a Mercurial Repository](http://stackoverflow.com/questions/883452/git-interoperability-with-a-mercurial-repository) – Wooble Aug 25 '11 at 15:31
  • @Wooble - I see examples in there how to access Git repo with Hg, but not the other way around. Therefore I don't exactly see it as a dupe. If you know how would it be too much trouble to write down a few pointers. – Rook Aug 25 '11 at 20:36
  • I don't believe there's a way to use the git command-line tool to push to Bitbucket, but you should be able to use hg-git to close your local repo and then push it to Bitbucket. – Wooble Aug 25 '11 at 20:44
  • @Wooble - I see. I'll keep looking then. Could you (not you - but others) at least stop voting to close this then, since it's obviously not the same question as the above? – Rook Aug 25 '11 at 21:19

3 Answers3

16

As of today, it appears that BitBucket supports GIT natively. I don't think their documentation is up to date yet however.

http://www.infoq.com/news/2011/10/bitbucket-git

Peter
  • 29,498
  • 21
  • 89
  • 122
9

I use bitbucket daily.

  1. Log on to bitbucket.
  2. Set up a repository.
  3. Click clone in the webapp in your repository and copy the command to your clipboard.
  4. Paste the command into your terminal (assuming you have git installed).
  5. Copy all files for your project into the directory you cloned.
  6. type 'git push' and enter your bitbucket password.

Done!

Andrew Barber
  • 39,603
  • 20
  • 94
  • 123
JasonG
  • 5,794
  • 4
  • 39
  • 67
7

If you importing a repository, follow this

 cd /path/to/my/repo
 git remote add origin https://username@bitbucket.org/username/example.git
 git push -u origin master   # to push changes for the first time
lakshmen
  • 28,346
  • 66
  • 178
  • 276