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 3931186
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T23:19:41+00:00 2026-05-19T23:19:41+00:00

I’m using Git now from my Windows machine. I clone the repo, do some

  • 0

I’m using Git now from my Windows machine.

I clone the repo, do some changes and push.

Until here everything works fine.

But when I commit for example a test.txt in my local folder and push,

then look into my remote repo and do

git log:
shows the commit message

git status:
file deleted “test.txt”

What’s that?

Why ‘file deleted “test.txt”‘?

The file should be created!

I then can commit the change of the file’s deletion and when I pull to my local folder again, the file get’s deleted again in the local folder as well.

Any Help?

Yours, Joern.

  • 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-19T23:19:41+00:00Added an answer on May 19, 2026 at 11:19 pm

    You mention that you use gitosis, but from the command output you provided my only conclusion is that your gitosis setup is COMPLETELY broken.

    First thing I notice is that you are asked for a password, and it appears you entered it and the push continued on. The server should never ask for a password, if it does then its a sign that you aren’t providing the correct ssh keypair to the server or the server is misconfigured and should result in an aborted push attempt since the account gitosis is using should not have a password set. By using a password it means you are overriding everything that gitosis is designed to do and you might as well just remove it because its not being used at all.

    Second thing I noticed is you are pushing to /var/www/saris/.git which by standard naming convention indicates a non-bare repo. Again you seem to be going around everything gitosis does because gitosis only works with bare repos. In addition this is exactly why you see no changes on the server. When pushing to a non-bare repo the working tree is never updated so the effect you seem to be trying to get (updating a website in /var/www/saris) will not work. See https://git.wiki.kernel.org/index.php/GitFaq#non-bare and http://toroid.org/ams/git-website-howto for more information about non-bare repos and managing websites with git.

    Additionally I like to point out whenever possible that gitosis is unmaintained and deprecated by the git community in favor of the superior gitolite.

    EDIT: You’ve completely removed the original question and replaced it with another unrelated question and lost all the original details. You should have just created a new question but I’ll answer your new question anyway.

    Your new question is essentially one of the most basic and common git questions. It is asked so often that it has its part of the GitFaq which I’ve copied to here and even linked when I answered your original question.

    Why won’t I see changes in the remote repo after "git push"?

    The push operation is always about propagating the repository history and updating the refs, and never touches the working tree files. In particular, if you push to update the branch that is checked out in a remote repository the files in the work tree will not be updated.

    This is a precautionary design decision. The remote repository’s work tree may have local changes, and there is no way for you, who are pushing into the remote repository, to resolve conflicts between the changes you are pushing and the ones in the work tree. However, you can easily make a post-update hook to update the working copy of the checked out branch. The reason for not making this a default example hook is that they only notify the person doing the pushing if there was a problem. The latest draft post-update hook for this is at http://utsl.gen.nz/git/post-update, which deals with almost all cases, apart from where there is already a conflicted merge on the remote side (as git-stash cannot currently stash this). It also fails to work in instances where it could, such as none of the files are actually conflicting.

    A quick rule of thumb is to never push into a repository that has a work tree attached to it, until you know what you are doing.

    If you are sure what you are doing, you can do a "git reset –hard" on the side you pushed to. Note that this WILL lose ALL changes you made on that side, resetting the working tree to the newest revision you pushed. See this article about bare repositories for details.

    Again please read http://toroid.org/ams/git-website-howto which I linked when I answered your first question. If you use that solution you will not have this problem.

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

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Does anyone know how can I replace this 2 symbol below from the string
I'm making a simple page using Google Maps API 3. My first. One marker
We're building an app, our first using Rails 3, and we're having to build
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a bunch of posts stored in text files formatted in yaml/textile (from
I have some data like this: 1 2 3 4 5 9 2 6
In order to apply a triggered animation to all ToolTip s in my app,

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.