0

i want to rewind my odoo branch to the initial commit stage and have found this command for reverting it : git checkout <SHA1>.

Sadly when trying this on my odoo shell it said "fatal: not a git repository (or any of the parent directories): .git".

the SHA1 i gave it was the SHA1 of the initial commit of the main branch. I don't understand why this doesn't work. Any help is Appreciated thank you.

JL_Funk
  • 41
  • 9
  • Are you in the correct folder? – Ouss Mar 29 '21 at 12:10
  • @Oussama i think so, i navigated from the branch to the shell of the branch which should start in the correct folder. according to pwd i am in the /home/odoo folder if that is of any help? – JL_Funk Mar 29 '21 at 12:33
  • Are you sure that this is actually a clone of the *repository*, and not simply an extract from one particular commit archive? Is there a `.git` directory in `/home/odoo`? – torek Mar 29 '21 at 23:41
  • Unrelated to the above, I would note here that `git checkout ` does not exactly *revert* (which in Git, means "back out the effect of a single commit"). It simply *extracts* the given commit. That's probably what you want, just beware of the word *revert* here. – torek Mar 29 '21 at 23:47
  • @torek thank you i will remember that :) and i checked and there is actually no .git directory in there so yeah that explains why it doesn't work. Thank you – JL_Funk Mar 30 '21 at 09:10

0 Answers0