I wish I could say that this was the first time I'd ever done this.

Nov 12, 2015 3:46 PM

truk77

Views

111

Likes

26

Dislikes

3

I wish I could say that this was the first time I'd ever done this.

Fortunately, I've got enough notes and similar code in other files to rebuild this particular script without too much pain, but it's still a kick in the teeth.

Remember kids: Commit early, commit often.

memes

rm -rf /

10 years ago | Likes 3 Dislikes 0

*swoosh* that's the sound of this going straight over my head.

10 years ago | Likes 2 Dislikes 0

just revert back to.. oh.

10 years ago | Likes 4 Dislikes 0

You dont have shadow volumes turned on?

10 years ago | Likes 1 Dislikes 0

it allways goes into a git repository

10 years ago | Likes 1 Dislikes 0

Oh, god. I'm so sorry.

10 years ago | Likes 1 Dislikes 0

Dude ... creating the repo should be the first thing you do. Do you think you're going to get it right and complete on the first try ?

10 years ago | Likes 6 Dislikes 0

also, hmm, git init ?

10 years ago | Likes 3 Dislikes 0

Yeah, I know, I know. It was some messy proof-of-concept code that was intertwined with a different project's tree. Needed to isolate it.

10 years ago | Likes 3 Dislikes 0

To isolate a subdir into a new project, there's this nifty command: git filter-branch --subdirectory-filter foo -- --all (1/2)

10 years ago | Likes 2 Dislikes 0

but run it on a clone of the repo, or you'll lose everything else (2/2)

10 years ago | Likes 1 Dislikes 0

Thanks for the tip!

10 years ago | Likes 1 Dislikes 0