Recover from pre-commit-adjacent file losses
everydaysuperpowers.dev·30w
📂Git
Preview
Report Post

The pre-commit project is immensely helpful.You can learn about pre-commit at their very helpful documentation page. I use it on every project at home and work to run a few checks and ensure my code is formatted in a uniform fashion every time I commit it to the repo.

The other day, I had an issue during the pre-commit cycle.

Another process changed a file while pre-commit was running its tasks, and as a result, my repository was in a state where it seemed I lost every modified file. It seemed like I lost hours of workMental note: I need to work on doing smaller commits more often. .

Now, I don’t think this is a problem with pre-commit. I couldn’t reproduce this situation after many attemptsMy best guess is that it was a race condition, where Gulp was …

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help