Is it possible to delete all changes in the working directory?

New to git (through my new assignment) and getting the instruction “just to make an attempt before committing”, I did it. To my great surprise, all the changes in my working directory disappeared.

  • How did this happen?
  • Where did these files go?
  • Is there any way to restore them?

Thanks.

+4
source share
2 answers

git pull git fetch git merge. , , , , git pull . , , commit, git pull git pull --rebase. git push.

, , , git pull, .

, , , , , git pull, - , - .

+5

, - . .

, , , .

-

commit -

git add <filename>

-

git commit -m "added blah feature"

, Pull ( rebase), -

git pull --rebase

(YAY!) -

git push -u origin master

, ( CI, ) -

( reset , , ) . , , (), . , , .

, :) !

+6
source

Source: https://habr.com/ru/post/1625663/


All Articles