Why doesn't git push?

There is a git repository of the project FreePBX. Make a branch, make a clone of yourself, make changes in the source code, do the addition using the command:

$ git add [filename]

After doing komit:

git commit

Make a description of the changes made and then trying to upload changes to the server:

$ git push -u origin master

or anything else, but in any case you get the message: Everything up-to-date

Previously never seen, even do not know what could not be change.

That's actually what displays the command 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)

 modified: db_connect.php</file>


By the way, git diff shows nothing, but git diff --cached shows the changes. Everything seems as it should, but the changes are not unloaded.

UPD:

The changes were uploaded to the server, only the lock change was done differently, using the command:

$ git commit-a

According to the idea, as far as I know, the option -a allows to dispense with the commands git add, the more it does not do anything special, but I still something to see, I've added the modified file.

As a result, the question remains open. What I did wrong, if the commit executed only with option -a?

UPD2:

By the way, guys, I'm sorry for not believing everyone who said that I did not commit, I just don't believe because I thought I was doing the commit.
September 18th 19 at 23:51
2 answers
September 18th 19 at 23:53
Solution
apparently, the commit you just did
But what about the message in the status: "Changes to be committed:" ? - mario commented on September 18th 19 at 23:56
: well, it means that they do not sammicheli. This change will sakimichan following a successful commit command. - Dereck.Beier20 commented on September 18th 19 at 23:59
this means that changes in this file have, and committing (that is, the commit failed) - constantin.Dani commented on September 19th 19 at 00:02
to commit, do not say "git commit" - Rhea.Witting commented on September 19th 19 at 00:05
And how committing? Tell us if it's so sure that I did not recorded the changes?

And by the way, if you want to commit changes, in the git status command is the following entry: "Changes not staged for commit" - mario commented on September 19th 19 at 00:08
why not enough, you can commit changes just by the command "git commit" can be a command, e.g. "git commit-a-m 'about' tab". Or am I wrong? - mario commented on September 19th 19 at 00:11
well, obviously, even you have written - "here are the changes prepared to commit", then commit it was not.

and what happens when you do git commit? - Rhea.Witting commented on September 19th 19 at 00:14
: open the editor, make the description, save the changes and all. What else? I've always done, never so as now. - mario commented on September 19th 19 at 00:17
What You are arguing - check that the commit using git log.
If you made it, git status would produce "nothing to commit" and that the local branch is ahead external. - Joanie_Padbe commented on September 19th 19 at 00:20
By the way Yes, if all goes well, the logs are all displayed. - mario commented on September 19th 19 at 00:23
: well the fact remains, you change sestadieni but not sammilani. something somewhere missing. - Rhea.Witting commented on September 19th 19 at 00:26
: here Yes, miss, but I do not understand what is wrong. I did the update of the question, look, the changes are still unloaded, I described how. - mario commented on September 19th 19 at 00:29
your favorite team needs to be 'git commit-a-m "comment here"' - Britney52 commented on September 19th 19 at 00:32
: now I will only do... Thanks ;) - mario commented on September 19th 19 at 00:35
September 18th 19 at 23:55
Solution
git commit-a .

git commit

Find more questions by tags FreePBXGit