Ok, hopefully this should be easy for you. I'm new to git, BitBucket and somewhat new to version control too, I'm going to be missing something obvious to you.
So here's what I've done: I've installed git on my machine and set my globals. Set up a new repo on BitBucket. Then:
$ git clone https://[me]@bitbucket.org/[me]/[my_project].git
I create a new file (index.html) locally, add and commit:
$ git add index.html
$ git commit -m "Initial commit."
[master (root-commit) 01d4120] Initial commit.
1 files changed, 164 insertions(+), 0 deletions(-)
create mode 100755 index.html
Committed successfully.
$ git push
Password:
Everything up-to-date
I enter my password aaaaaand... Everything up-to-date
... It doesn't push. I just want to push straight to the remote trunk from my local trunk.
I'm sorry if this is really obvious but I'm so new to everything I can't seem to find any info, I was just working through the 'BitBucket 101' steps. Cheers.
You will have to do:
git push origin master
Change origin if you have a different remote.
Change master if you have different branch.
I am not sure it is bitbucket.org or GIT's issue.
After you clone the project. In your local configuration, you have the origin setup to the remote. But no branch information yet. So you have to use '$ git push origin ' to do it once. After that. you can simply use '$ git push'.
'$git push -v ' would be helpful to find issue. It prints out detail information.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With