Question: My Github repo won't update after `git push -u origin master` command!
It says:

```
Branch 'master' set up to track remote branch 'master' from 'origin'. Everything up-to-date

```

The result for `git remote show origin` is:

```
* remote origin
  Fetch URL: git@github.com:MyGithubID/RepoName.git
  Push  URL: git@github.com:MyGithubID/RepoName.git
  HEAD branch: master
  Remote branch:
    master tracked
  Local branch configured for 'git pull':
    master merges with remote master
  Local ref configured for 'git push':
    master pushes to master (up to date)

```

and for `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:   myFile.m

```

I have no idea what is going on! I tried `git push --all origin` and it says: `Everything up-to-date` but it's not!
I'm new with git; I checked 'config' file in my .git directory and the information is correct. What is wrong with my git?!

Answer: 
You have only staged the file for commit, but not actually committed the change. You have to commit the change to get a commit-id which is then used during the push/pull phase.

```
git commit

```

With `git`, committing a change is a two step process.

The first step is to add your change(s) to a so called staging area. This is local to the repo and will not participate when pushing a changes to the remote. In your case you have added a new file to the staging area and git push will not consider the changes in the staging area. Only changes that are committed are discussed during the push/pull process. 

The second step is to commit the changes.. This step you don't get to choose what changes you can commit. All the changes that you have added in the staging area gets into the commit and git creates a commit-id which is now version controlled (in your local repo).. Once a commit is done, the staging area is clear.

some commands to add files to the staging are.

```
git add <file_name> #Add all changes made to this file.
git add <dir> #Add all changed files in that directory.
git add -i # This is interactive menu-type command

```

Instead of adding all the changes(called as hunks) made to a file, You can also choose to add selected changes in a file, using the patch option. 

```
git add -i #choose patch option. 

```

The changes in staging area is the delta from `HEAD`. To remove the changes from the staging area you have to reset the HEAD file as it was in HEAD. Once you reset, all changes are gone from the staging area but not lost, you will see the hunks in the un-staged area.

```
git reset HEAD <file>

```
```
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

  new file:   myFile.m

```

That implies that you have to commit your changes. So, you've done well, you're almost there you just have to do a:

```
git commit -m "Here a short descriptive message" -m "Here a longer more detailed message"

```

and then you can do your push:

```
git push origin master

```