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.
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.
> 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.
Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events