Stack Exchange
log in
users (9)
rooms (12)
faq
NullDev
general
recent
conversations
JavaScript
Topic: Anything JavaScript, ECMAScript including Node, React, ...
4
NullDev
Sep 19, 2019 14:31
JS doesn't rebind "this" when you use arrow functions. That's why it worked when you used a normal function declaration
NullDev
Sep 19, 2019 14:29
Arrow functions bind
this
differently. It binds
this
lexically. Or briefly: It uses the context of the surrounding function
Discussion between Umair Jameel and N
…
Imported from a comment discussion on
stackoverflow.com/questi...
NullDev
Apr 12, 2017 13:54
sorry to hear that
NullDev
Apr 12, 2017 13:54
oh :/
NullDev
Apr 12, 2017 13:53
sorry that I couldn't really help
NullDev
Apr 12, 2017 13:53
No problem
NullDev
Apr 12, 2017 13:53
They are life savers
NullDev
Apr 12, 2017 13:53
Backups, my friend. Backups.
NullDev
Apr 12, 2017 13:50
So I could fix it with
git checkout HEAD /path/to/file
NullDev
Apr 12, 2017 13:50
I don't know, sorry :/
It happened only once to me but just with one file
NullDev
Apr 12, 2017 13:41
why not
NullDev
Apr 12, 2017 13:40
what is the output
NullDev
Apr 12, 2017 13:39
so this ^ doesnt work?
NullDev
Apr 12, 2017 13:39
git reset --hard <your sha>
NullDev
Apr 12, 2017 13:26
the one from your latest commit. Where your code was still there
NullDev
Apr 12, 2017 13:23
yes
NullDev
Apr 12, 2017 13:19
The SHA is the Hash on the left side of your picture
NullDev
Apr 12, 2017 13:17
@UmairJameel No I mean the
SHA
of your
latest commit
you got from the
reflog
NullDev
Apr 12, 2017 13:17
@UmairJameel Ok then run
git reset --hard <your sha>
NullDev
Apr 12, 2017 13:17
@UmairJameel Try to run
git reflog
and tell me if you see the SHA of your latest commit (
HEAD
)