简体   繁体   中英

How Do I Push an Existing Eclipse Project Up to Bitbucket With EGIT?

I have a project for an interview I need to get onto Bitbucket. I normally use Github, so the slight change is throwing me off. I coded the project, tested it, and it works fine. Now I want to get it up on the repository, but can't. I installed EGIT to my Eclipse instance on my local, and while it will attach itself to the empty online repository it won't allow me to import my local code to a do a push and commit.

Can anyone advise on the simplest way I can get this taken care of?

With EGit on Neon: right-click on project > Team > Push branch...., you'll see the push dialog and a button to create a new remote. Click this button, configure the bitbucket repo, Finish. Then the repo should be available in the Push Dialog. So select it as target and press Finish.

In Bitbucket you can import project from github.

But if you want to change git remote origin and send the whole project again to Bitbucket get to this file : .git/config and change the [remote "origin"] section to the Bitbucket repo http or ssh and then:

git add all or git add .

git commit -m "last commit massage ..."

git push -u origin master

I recommand to use Gitlab instead of Bitbucket for private repo.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM