I am a git newbie. I just created a new project with just 4 new files test1 test2 test3 test4. Then all I did are the following:
$ git init
$ git add .
$ git commit -m "VERY 1st commit"
as simple as that.
then i added a remote repo is also an entirely new repo i just created in bitbucket.org
$ git remote add rakspace http://syedrakib@bitbucket.org/syedrakib/mysamplegit
$ git push rakspace
as you can tell it’s entirely new workspace being pushed into an entirely new repo. it returns this:
Everything up-to-date
what is it i am doing wrong here? Clearly the source files of the remote repo are NOT getting updated.
EDIT: I have got 2 branches in my local repo: *master* and *new_branch*
The default behavior of
git pushis to push “matching” branches. That means any branches on your side that have a branch named the same thing on the other side get pushed. In a brand new repository, there are no branches. Therefore no branches match. You can cause a branch with a name matching your branch to be created on the remote usinggit push <remote name> <branch name>. In your case:git push rakspace masterYou can find out about and change the push settings by looking for
push.defaultin the git config documentation.