S
S
Sasha Yashchuk2019-03-19 19:17:32
JavaScript
Sasha Yashchuk, 2019-03-19 19:17:32

Git error: failed to push some refs to deleted files! How to recover?

Hello! I wanted to upload my project to git, looked at the cheat sheet at this link https://toster.ru/q/492830, ran the following commands:
git init
git add --all
git commit -a -m 'my commit'
git remote add origin my link to the repository
then forgot to skip the git pull command and write git push origin master, after which the error error appeared: failed to push some refs to5c91158e20d49071103089.jpeg
after which I wrote the git pull --rebase origin master command
and my files were deleted from the project folder altogether , and they are not in the basket, not in the repository ...
Can I somehow roll back the changes and return the files?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Y
Yura Khlyan, 2019-03-19
@Alex_bliznec

git reset HEAD~1

T
tyzberd, 2019-03-19
@tyzberd

if there was a commit, then you can return to it
https://www.christianengvall.se/git-reset-origin-m...
https://stackoverflow.com/questions/1223354/undo-g...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question