Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 772803
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T18:51:40+00:00 2026-05-14T18:51:40+00:00

I do: $ git commit . $ git push error: Entry ‘file.php’ not uptodate.

  • 0

I do:

$ git commit .
$ git push
error: Entry 'file.php' not uptodate. Cannot merge.

Then I do

$ git pull
Already up-to-date.

What do I do? I just want to get the latest version from the remote copy, and overwrite anything on my local copy.

Edit: I tried everything. I deleted my local repo, and

$ git clone ssh://root@something.com/directory
...
Checking out files: 100%, done.

$ git status
On branch master
nothing to commit (working directory clean)

All looks good, right? Pull just in case.

$ git pull
Already up-to-date.

I make a one line change in a file to see if I can push it.

$ git commit .
[master 1e18af1] Rando change
1 files changed, 2 insertions(+), 0 deletions(-)

$ git push
Counting objects: 13, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (7/7), 646 bytes, done.
Total 7 (delta 3), reused 0 (delta 0)
From /directory
d6d61aa..1e18af1  master     -> origin/master
error: Entry 'someotherfile.php' not uptodate. Cannot merge.
Updating b8f9a54..1e18af1
To  ssh://root@something.com/directory
d6d61aa..1e18af1  master -> master

I have no idea what’s going on! How can I commit/pull again normally? Thanks very much!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T18:51:41+00:00Added an answer on May 14, 2026 at 6:51 pm

    This is just a hunch, but was your remote a bare repo or a working directory? If it was a working directory rather than a bare repo, the file.php file on the remote had uncommitted changes. Your git push command was trying to advance the HEAD at the remote which was causing conflicts due to the uncommitted changes.

    This is why you usually git pull to update a working directory, and use git push on bare repos. FYI, to setup a bare repo for use as something similar to a central CVS/SVN/etc repo, do the following on the remote:

    $ mkdir my-git-repo
    $ cd my-git-repo
    $ git init --bare
    

    Then in your local repo:

    $ cd my-git-repo.git
    $ git remote add origin user@host:/path/to/my-git-repo/
    $ git config branch.master.remote origin
    $ git config branch.master.merge refs/heads/master
    $ git push origin master
    

    Now you have a bare repo to push/pull into/from that contains your master branch. You can repeat the last three local steps with any additional local branches you want to put on the remote. Cloning is the same as before and you don’t need to use git config as remotes are set automatically and remote merging refs are set when you use tracking branches.

    Hope that helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 466k
  • Answers 467k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I would suggest creating the font yourself. There are several… May 16, 2026 at 1:53 am
  • Editorial Team
    Editorial Team added an answer You can convert it to string and let it ride.… May 16, 2026 at 1:53 am
  • Editorial Team
    Editorial Team added an answer Much like any LINQ implementation, QueryOver uses Expression trees manipulation… May 16, 2026 at 1:53 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.