Skip to content

Wherein I endeavor to get over my fear(s) of errors by making them happen! 🙌

Notifications You must be signed in to change notification settings

dotsara/wreck-it

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 

Repository files navigation

December 2021

Most useful git command I run on the regular

git reset --soft HEAD~;
It is not uncommon to commit (but not push) all the files I have staged, then realize either (a) I didn't mean to do that or (b) a co-worker has pushed a change to the PR we're working on and I'm not interested in creating a merge commit 😬.

So I run the above to walk back the commit, then I run git restore --staged . to unstage all those changed files, and then I re-build my commit(s) as needed.


Update 15-July-2016
Still wrecking things in git! 😀 But now I'm mostly making notes over in issues as a breadcrumb trail. Feel free to add your own busted-then-fixed situations! ✨

I'm gonna wreck it!

For a long time: when I encountered merge conflicts and non-fast-forward errors with git at work, my SOP was to freak. right. out.
noooo

And in past-me's defense, 99% of the time this had zero impact on anyone else, so my preferred solution of blowing away the branch and starting over worked just fine. Of course, I finally accepted this was kind of a terrible way to behave—or anyway, it wouldn't scale—and decided to teach myself more productive responses to branchname|CONFLICT.

I made a repo at work where I set about trying to induce the errors and weirdo messages that make me so nervous. It worked really well! (I even had a rebase-squash that put me through 5 rounds of merge conflicts like a champ.) And then I deleted the repo.

Way to go, me! …

So I'm doing it again in the name of practice and with the hope that perhaps it'll be useful to someone else as well.

Reference sites I really like

About

Wherein I endeavor to get over my fear(s) of errors by making them happen! 🙌

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published