1

I have cloned a repository from github and checked out a remote branch. I made a change to the remote branch, committed it, but then when I try to push the change back to the remote branch I get the message "Everything is up-to-date". What am I doing wrong here? Plus, it doesn't let me push to the branch, the only option is master.

I'm using git gui, and checking out the branch was very simple. I just can't figure out how to push the change back to the repository. Any help is appreciated, thanks!

GiH
  • 14,006
  • 13
  • 43
  • 56

1 Answers1

3

From the command line,

git push -u origin branch-name

Now in git gui you should have that branch come up

Adam Dymitruk
  • 124,556
  • 26
  • 146
  • 141
  • you're right, i do see it now but it still tells me that everything is up to date... any idea why its not pushing the changes? – GiH Jun 17 '11 at 00:19
  • The command line pushed it. So now it's up to date. Check on github – Adam Dymitruk Jun 17 '11 at 01:13
  • I don't see any changes on github under my actions, nor in the repository :( – GiH Jun 17 '11 at 04:51
  • Did you pick the other branch from the drop down? – Adam Dymitruk Jun 17 '11 at 05:58
  • it turned out the change I made was lost somehow, maybe by switching between branches or something, I had to make the change and commit it again, then pushed it and it worked :) Thanks! I wonder what happened to my previous commit haha... – GiH Jun 17 '11 at 14:27
  • If you don't use --force with commands or reset --hard you shouldn't lose anything. As long as you committed, you can check the reflog. – Adam Dymitruk Jun 17 '11 at 16:34
  • hey you're right... the reflog shows that the commits are both there... the first one shows that it was moved from a hash to the remotebranch and the second one shows that it was moved from master to origin/remotebranch... i still don't get why it didn't push and show in github the first time, i'd love an explanation if you have an idea? – GiH Jun 19 '11 at 21:57