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!
If you are pushing into a a remote that has a checkout-out working copy you will not see the changes automatically.
gitis pushing the changes into the repository (the.gitdirectory). If you want to update the associated working copy, you would need to implement the appropriate logic in thepost-updatehook.In general,
gitwon’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: