I have a public repository. No one else has forked, pulled, or done anything else to it. I made some minor changes to one file, successfully committed them, and tried to push. It says 'Everything up-to-date'. There are no branches. I'm very, very new to git and I don't understand what on earth is going on.
git remote show origin
tells me:
HEAD branch: master
Remote branch:
master tracked
Local ref configured for 'git push':
master pushes to master (up to date)
Any ideas what I can do to make this understand that it's NOT up to date?
Thanks
Updates:
git status
:
# On branch master # Untracked files: # (use "git add ..." to include in what will be committed) # # histmarkup.el # vendor/yasnippet-0.6.1c/snippets/ no changes added to commit (use "git add" and/or "git commit -a")
git branch -a
:
* master remotes/origin/master
git fsck
:
dangling tree 105cb101ca1a4d2cbe1b5c73eb4a238e22cb4998 dangling tree 85bd0461f0fcb1618d46c8a80d3a4a7932de34bb
Update 2: I re-opened the modified file, and the modifications I KNOW I had made were gone. So I added them again, went through the rigamarole of git status
, git add filename
, git commit -m "(message)"
, and git push origin master
, and all of a sudden it works the way it's supposed to.
Update 3: git reflog
output:
009251 HEAD@{0}: commit: added copy/paste keybindings 06920f9 HEAD@{1}: commit: Minor .gitignore tweak 84aa30c HEAD@{2}: checkout: moving from master to master 84aa30c HEAD@{3}: checkout: moving from ec16cca979045547a5444e20f48ed468dee81dd4 to master ec16cca HEAD@{4}: commit: Added keybindings for copy/paste 5c4a611 HEAD@{5}: commit: remember-mode keybinding to M-R f3e4729 HEAD@{6}: commit: Correcting last push which wiped out some stuff fa28a3e HEAD@{7}: checkout: moving from master to fa28a3ed80eb0c6d4375ae77060d5cb4143d6a8e^0 84aa30c HEAD@{8}: commit: Modified keybindings, added LaTeX hook 10e7718 HEAD@{9}: commit: Added a few keybindings d62378b HEAD@{10}: commit (initial): first commit
EDIT: This it seems is not the correct solution, see the comments to the question. I am leaving the answer because the git add rather than git commit -a hint might help someone in the future.
Hello, did you add before you commited? something like
(don't forget the dot)
before the
(I find this site useful for getting going - http://gitref.org/remotes/#push)
Use
where
yourlocalbranch
could bemaster
(which probably would be your local copy of origin master) or any other branch. If unsure use--verbose
and--dry-run
options.Try
http://git-scm.com/docs/git-config :
push.default
Defines the action git push should take if no refspec is given on the command line, no refspec is configured in the remote, and no refspec is implied by any of the options given on the command line. Possible values are: