-1

Im soo gaddem stupid, I need some help here.

I was trying to get my project to Github and i created a repo in github. Then i did git clone ........git and after a few tryes, my project was gone.

I had some problems doign "git add ..." becouse "everything" on my mac was include, saw it when did git status. So i tryed to clear my git status. The command i did were

  • git reset --HARD
  • git checkout
  • git clear
  • git clear -xdf
  • git clear -d

So buttom line is, where my project was, there is only the readme file from github after all this stupid things.

How can i undo this change and get my project back?

Sindri Þór
  • 2,887
  • 3
  • 26
  • 32

1 Answers1

0
git log

Find a commit where you want to continue from.

git checkout <revision_id> .

The dot means to apply the changes to the entire tree, you need this. After that, commit the changes, and continue as usual.

Adis
  • 4,512
  • 2
  • 33
  • 40
  • The problem is that i never got to adding or committing there is nothing in the log. So i guess this is a local problem, but thanks! – Sindri Þór Mar 07 '14 at 14:56
  • 1
    In that case, git can't reverse what you did, there's a reason why --HARD is spelt that way. If there's not much work, you'll have to do it over again, if there is, I suggest you try to recover your files with some deleted file recovery tool. – Adis Mar 07 '14 at 14:58