How I can update changes on remote git repository?

I finished to commit and push changes on remote git repository but when I view remote repository’s files, these are outdated. I’m using Git Bash.

View image

  • Move commits from master onto a branch using git
  • How to edit Git “add patch” hunks/diffs/lines during selective staging?
  • Git: add vs push vs commit
  • apparently same commits give different sha1, why?
  • Git: retrieve specific commit
  • Remove a merge commit, keeping current changes
  • The red text are changes made in repositories clones. These changes aren’t reflected in the original repository’s physical file

    How I can do to reflect the changes?

  • Modifying sample Hello World Node.js code not taking effect in Google Compute Engine
  • Grails and .gitigore
  • Does it make a difference where Git is installed
  • How to split a patch in StGit?
  • Change case of a file on Windows?
  • Howto add a changed file to an older (not last) commit in Git
  • One Solution collect form web for “How I can update changes on remote git repository?”

    I assumed that you are pushing to a branch that the remote currently checking out. Because it seems like a non-bare repository, and have files checking out in your description.

    I made some simple tests to simulate such push, and the following message displayed:

    remote: error: By default, updating the current branch in a non-bare repository
    remote: error: is denied, because it will make the index and work tree inconsistent
    remote: error: with what you pushed, and will require 'git reset --hard' to match
    remote: error: the work tree to HEAD.
    remote: error: 
    remote: error: You can set 'receive.denyCurrentBranch' configuration variable to
    remote: error: 'ignore' or 'warn' in the remote repository to allow pushing into
    remote: error: its current branch; however, this is not recommended unless you
    remote: error: arranged to update its work tree to match what you pushed in some
    remote: error: other way.

    If you’re sure you do the push successfully(that will be reject at default), then you have to execute following at the remote repository.

    git reset --hard
    Git Baby is a git and github fan, let's start git clone.