2

I'm working on some file in my local git repository and want to send the changes to the an existing remote git repository from which the local was cloned via https. I know you're not suppose to update a not bare-repository, so I created a branch to push the changes.
Here is what I've done, which isn't working:

created my git init - local git add -A // added all files
git commit -m "first commit"
git remote add origin [https://github.com/...]
git push -u origin master

This I understand, it pushed to github - hooray!

Now I want to update the GitHub repository.
First I thought you could just do, after git add * & git commit -m "message", git push origin master, but after reading this, I realized you should push to a repository that is not bare.
So, I created a branch! git checkout -b new-branch.
I followed the same sets as above, git add *, git commit -m "message", git push origin new-branch..."Your branch is up-to-date with 'origin/master'."
Great!

So, I want to merge these branches, I switch to the master branch, and do a git pull and then git push origin master.
I get the message every up-up-to-date. But when I check the remote repo, nothing has updated!
Any insight or advice would be greatly appreciated.

EDIT

git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)

new file:   .bowerrc
new file:   bower.json
modified:   index.html
new file:   public/vendor/jquery-1.11.3.min/.bower.json
new file:   public/vendor/jquery-1.11.3.min/index.js
Community
  • 1
  • 1
user2647510
  • 189
  • 1
  • 13

1 Answers1

2

realized you should push to a repository that is not bare.

No, you should push to a bare repo, not a non-bare repo.

And all GitHub repo are bare anyway, so pushing is not tied to creating a branch.

According to your git status, you are still on the branch master, with files already added to the index.
Simply commit and push. No need for a new branch.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250