I'm testing out Git and Bitbucket.
I've created a repository on Bitbucket and have created a local copy of the repo and I am committing files into it. I can't seem to push the files from my local repository to the remote repository.
Here's what I'm doing:
git clone https://[email protected]/me/test.git
cd test
touch dummy
git add dummy
git commit dummy -m "my first git commit"
git push
The final line outputs:
Everything up-to-date
And when I log on to Bitbucket I cann't see my dummy file.
What am I doing wrong?
EDIT:
Doing this worked:
git push origin master:master
Any explanations as to the difference between this and a simple git push
?
Use git push origin master
instead.
You have a repository locally and the initial git push
is "pushing" to it. It's not necessary to do so (as it is local) and it shows everything as up-to-date. git push origin master
specifies a a remote repository (origin
) and the branch located there (master
).
For more information, check out this resource.