Skip to content

Instantly share code, notes, and snippets.

View ThinaticSystem's full-sized avatar
🈂️
以外の感情がない

しなちくシステム ThinaticSystem

🈂️
以外の感情がない
View GitHub Profile
@marihachi
marihachi / parsing-01.js
Last active March 21, 2023 15:07
パーサーの例
const T_EOF = 'EOF'; // end of input
const T_NUM = 'NUM'; // [0-9]+
const T_ADD = 'ADD'; // "+"
const T_SUB = 'SUB'; // "-"
const T_MUL = 'MUL'; // "*"
const T_DIV = 'DIV'; // "/"
/**
* @param {string} input
*/
@mitchellh
mitchellh / merge_vs_rebase_vs_squash.md
Last active March 18, 2025 21:32
Merge vs. Rebase vs. Squash

I get asked pretty regularly what my opinion is on merge commits vs rebasing vs squashing. I've typed up this response so many times that I've decided to just put it in a gist so I can reference it whenever it comes up again.

I use merge, squash, rebase all situationally. I believe they all have their merits but their usage depends on the context. I think anyone who says any particular strategy is the right answer 100% of the time is wrong, but I think there is considerable acceptable leeway in when you use each. What follows is my personal and professional opinion: