You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This workflow is outside of the "git pull -r origin branchName" workflow we use for rebases without merge commmits.
This workflow is just to squash commits on a local/unshared branch.
Keep in mind that "rewriting history can make teammates sad, angry or worse" standard warnings about rebasing.
Choose the commit hash which will "choose everything AFTER this commit to rebase."
Remember you're rebasing a branch against itself, not src/destination rebasing like normal rebasing workflow.
git rebase -i hash123-everything-after-this-commit
That'll send you into a screen that's a list of commits. Use rename, squash etc. then :x to save/exit...
Functional Programming: Optionals, Maybes, and Optional Chaining and Nullish Coalescing
WIP
Optional chaining, null coalescing, and optionals and maybes
The maybe/optional data types in functional languages such as Haskell and Scala have ways to handle null/undefined that are often superior to using validation, conditionals and operators to infer whether or not a value is nullish.
That's what optional chaining and null coalescing remind me of. They're also a replacement for usage of Lodash .get() method which allows for default values to be set in the last parameter, hence handling nullish value use cases.
Optional chaining
Rather than using something.property.anotherproperty, which can error (and hence crash your program/web page) if it encounters a nullish value for one of the properties, we use something?.property?.anotherproperty instead, which only returns undefined (instead of an error) if a nullish value is encountered in one of the properties.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters