You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hi,
i have an exitsing code on my local drive and i have created a empty (new ) repo in the bit bucket. now i want to push the code to the repo using the source tree. i dont want to clone to a new folder and copy the files allover instead i want to commit the existing folder to the repo using source tree not the command line way. Please let me know if anyone has a solution to this.
Following on @blaiseli , the instructions above, and the Bitbucket default, is incorrect. You must have a completely bare repository to avoid a failed operation.
So, steps are
git remote add origin <the URL for your Bitbucket repository>
git push -u origin master
Or you can a force push, which will wipe out all existing files on the new repo
git push -u origin master --force
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @[deleted],
Welcome to Atlassian Community.
There should be instructions for how to populate your repository with local code shown if you access your repository in Bitbucket, but here are the steps:
git init
git add --all
git commit -m "Initial Commit"
git remote add origin <the URL for your Bitbucket repository>
git push -u origin master
Done, you should now see your code in Bitbucket.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
> There should be instructions for how to populate your repository with local code shown if you access your repository in Bitbucket
There apparently isn't when keeping the default option (include a .gitignore). And then, then the instructions fail (fatal: refusing to merge unrelated histories).
In my case, I had to delete the new repository and create another one, making sure there was no .gitignore. Then the instructions appeared and worked.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is there a way to edit responses?
This page is one of the first google results. But the method given here has been outdated for some time.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.