I am using the following command to load the updated contents on my project (I already have a repository and my source code on bitbucket), however I am unable to see any commits on my bitbucket account and even the modifications I made to the code are not appearing in the bitbucket repository…
$ cd /path/to/my/repo
$ git remote add origin https://abc@bitbucket.org/abc/test.git
$ git push -u origin master
Can some guide how should I go about..I have my repository and my initial source code is already on bitbucket, I just want to commit the updations I made to the code to bitbucket…I am clueless as to how should I go about this.
All you did was register the remote. Nothing come down from the remote location yet. Pushing is something you do to make your changes go across to the remote, not the other way around.
Short answer:
git cloneinstead.Long answer:
You need to fetch first.
will get the remote references and all objects referenced therein.
will list the branches that you pulled down (such as origin/master).
To update your master (assuming you already have it checked out)
although just
will work for you in this case.
Other branches can be made locally from the remote and checked out with