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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T19:56:12+00:00 2026-06-03T19:56:12+00:00

On my local machine I have cloned a remote repo, made some changes, commited,

  • 0

On my local machine I have cloned a remote repo, made some changes, commited, then pushed back to the remote repo which has NOT been touched in any way in the meantime.

On the remote machine when I look in the remote repo, I don’t see the changes I made. git status tells me that there are changes to be committed. When I look into the files, I do not see any of the changes I made. When I do git stash in the remote branch, I see the changes. So somehow git does not commit the pushed changes in the remote repo.

Could someone please explain the logic behind this to me and how I can circumvent this situation? Can I somehow push changes to the remote repo without having to git stash?

Thanks a lot for the clarifications!

  • 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-06-03T19:56:16+00:00Added an answer on June 3, 2026 at 7:56 pm

    If you are pushing into a a remote that has a checkout-out working copy you will not see the changes automatically. git is pushing the changes into the repository (the .git directory). If you want to update the associated working copy, you would need to implement the appropriate logic in the post-update hook.

    In general, git won’t even let you push to a remote with an associated working copy without explicit configuration…you would typically see an error along the lines of:

    remote: error: refusing to update checked out branch: refs/heads/master
    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.
    remote: error: 
    remote: error: To squelch this message and still keep the default behaviour, set
    remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.
    To /home/lars/repo1
     ! [remote rejected] master -> master (branch is currently checked out)
    error: failed to push some refs to '/home/lars/projects/administrivia/repo1'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A Git repository has been cloned on several developers' local machines. Some changes have
I have an XBAP currently published on my local machine, which has an 'About'
So if I have a Git repo on my local machine and I send
I have a Git repository on my local machine that I cloned from my
I have a remote machine RemoteMachine which hold the clone of another MachineWeNotConcern with:
I have a working tree on my local machine, and a remote repository as
I have started using Git. I have cloned the repo on my local system.
struts 2.0.11 - Currently I'm in my local machine and have two different web
Background: I have a WCF service deployed on my local machine that in turns
I have this membership site setup on my local machine using the ASP.NET membership

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.