V
V
Valery Selitsky2012-12-11 16:35:59
git
Valery Selitsky, 2012-12-11 16:35:59

fatal: 'origin': unable to chdir or not a git archive

I will be brief, the story began with the fact that remote.hostit was decided to put the already active project in the repository, further history will be more beautiful in the form of a log:

[email protected]:~/htdocs$ git init
[email protected]:~/htdocs$ git add .
[email protected]:~/htdocs$ git commit -m "Initial"
#


Here I make a bundle, download it to myself local.host, deploy it, configure remote origin to remote.host, check if pull works, generate keys for ssh, etc.
After that, I edit the file file.txt in the working copy and want to send it to the server.
local@local.host:~/my.cloned.repo$ git add file.txt
local@local.host:~/my.cloned.repo$ git commit -m "Testing"
local@local.host:~/my.cloned.repo$ git push origin master


After the push, I expect the pushed changes to be pulled into the working copy on remote.host, but I find that everything is wrong, I try to update the working copy myself:
[email protected]:~/htdocs$ git checkout
M       file.txt
#^^^^^^^^^^^^^^^^^^^^^^^ тут естественно ничего не происходит и в рабочей копии остался неотредактированный файл

[email protected]:~/htdocs$ git pull
fatal: 'origin': unable to chdir or not a git archive
fatal: The remote end hung up unexpectedly

[email protected]:~/htdocs$ git pull .
From .
 * branch            HEAD       -> FETCH_HEAD
Already up-to-date.

[email protected]:~/htdocs$ git status
# On branch master
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#       modified:   .gitignore
#       modified:   content/images/product/aps/alt111/pic_1.JPG
#

file.txt is old, moreover, git thinks that the working copy remote.hostis not in the HEAD stage and the files are modified relative to it!
Attention a question: how to update the remote working copy???

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
akral, 2012-12-11
@WaveCut

If I understand the situation correctly, then

git reset --hard

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question