def modal(options = {}) options[:button_style] ||= 'primary' if options[:header_icon] options[:icon] = icon options[:header_icon] end render 'util/modal', options: options end A simple snippet of Ruby code
def modal(options = {}) options[:button_style] ||= 'primary' if options[:header_icon] options[:icon] = icon options[:header_icon] end render 'util/modal', options: options end A sense of curiosity and wonder 🤔
git log file git log app/views/delete_app.html.erb fatal: ambiguous argument 'app/views/delete_app.html.erb': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]'
git log file git log app/views/delete_app.html.erb fatal: ambiguous argument 'app/views/delete_app.html.erb': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]' git log --follow -- app/views/delete_app.html.erb 86eba3127 Remove the delete app card and modal (2 years, 6 months ago, Mike C.) 650365ba2 Alphabetize the args (3 years, 5 months ago, Joan A.) ……… 27beda180 create an icon helper (3 years, 6 months ago, Liza Q.)
commit commit a37b6725 Date: Wed Jan 13 10:24:39 2021 -0800 ✂ Remove unused option header_icon It was introduced in 27beda180 but its last invocation was removed in 86eba3127. diff --git app/helpers/util_helper.rb options[:confirm_button_style] ||= 'primary' - if options[:header_icon] - options[:header_icon] = icon(options[:header_icon], class: 'margin-r-1-2') - end - render 'util/modal', options: options
stash git status Changes not staged for commit: modified: app/helpers/util_helper.rb Untracked files: app/views/add_app.html.erb git stash --include-untracked Saved working directory and index state WIP on feature_branch: 073a5e03f
stash git status Changes not staged for commit: modified: app/helpers/util_helper.rb Untracked files: app/views/add_app.html.erb git stash --include-untracked Saved working directory and index state WIP on feature_branch: 073a5e03f git stash apply
git log file 🤔 git log app/views/delete_app.html.erb fatal: ambiguous argument 'app/views/delete_app.html.erb': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]' git log --follow -- app/views/delete_app.html.erb 86eba3127 Remove the delete app card and modal (2 years, 6 months ago, Mike C.) ……… 650365ba2 Alphabetize the args (3 years, 5 months ago, Joan A.) 27beda180 create an icon helper (3 years, 6 months ago, Liza Q.)
git log file git log app/views/delete_app.html.erb 957e23451 Alphabetize the method arguments (3 days ago, Joan A.) 0f14cf51e HTML cleanup (4 months ago, Joan A.) a3c92896c Fix the link to embedded apps(6 months ago, Mike C.) 81634ab2a Remove app feature flag (7 months ago, Sarah K.) 1054bcb23 add a dedicated component (8 months ago, Sarah K.) (dozens of other commits) b921b4e05 Add metrics show page (2 years, 9 months ago, Sam P.) 5c177ca9c Move endpoint under app (3 years, 1 month ago, Joan A.) 650365ba2 Alphabetize the args (3 years, 5 months ago, Joan A.) 27beda180 create an icon helper (3 years, 6 months ago, Liza Q.)
git log file git log app/views/delete_app.html.erb 957e23451 Alphabetize the method arguments (3 days ago, Joan A.) 0f14cf51e HTML cleanup (4 months ago, Joan A.) a3c92896c Fix the link to embedded apps(6 months ago, Mike C.) 81634ab2a Remove app feature flag (7 months ago, Sarah K.) 1054bcb23 add a dedicated component (8 months ago, Sarah K.) (dozens of other commits) b921b4e05 Add metrics show page (2 years, 9 months ago, Sam P.) 5c177ca9c Move endpoint under app (3 years, 1 month ago, Joan A.) 650365ba2 Alphabetize the args (3 years, 5 months ago, Joan A.) 27beda180 create an icon helper (3 years, 6 months ago, Liza Q.) The code was added here
git log file git log app/views/delete_app.html.erb 957e23451 Alphabetize the method arguments (3 days ago, Joan A.) 0f14cf51e HTML cleanup (4 months ago, Joan A.) a3c92896c Fix the link to embedded apps(6 months ago, Mike C.) 81634ab2a Remove app feature flag (7 months ago, Sarah K.) 1054bcb23 add a dedicated component (8 months ago, Sarah K.) (dozens of other commits) b921b4e05 Add metrics show page (2 years, 9 months ago, Sam P.) 5c177ca9c Move endpoint under app (3 years, 1 month ago, Joan A.) 650365ba2 Alphabetize the args (3 years, 5 months ago, Joan A.) 27beda180 create an icon helper (3 years, 6 months ago, Liza Q.) The code is not there anymore The code was added here
git log file git log app/views/delete_app.html.erb 957e23451 Alphabetize the method arguments (3 days ago, Joan A.) 0f14cf51e HTML cleanup (4 months ago, Joan A.) a3c92896c Fix the link to embedded apps(6 months ago, Mike C.) 81634ab2a Remove app feature flag (7 months ago, Sarah K.) 1054bcb23 add a dedicated component (8 months ago, Sarah K.) (dozens of other commits) b921b4e05 Add metrics show page (2 years, 9 months ago, Sam P.) 5c177ca9c Move endpoint under app (3 years, 1 month ago, Joan A.) 650365ba2 Alphabetize the args (3 years, 5 months ago, Joan A.) 27beda180 create an icon helper (3 years, 6 months ago, Liza Q.) The code is not there anymore The code was added here Which commit removed it?
commit commit a37b6725 Date: Wed Jan 13 10:24:39 2021 -0800 ✂ Remove unused option header_icon It was introduced in 27beda180 but its last invocation was removed in 192734cdc. diff --git app/helpers/util_helper.rb options[:confirm_button_style] ||= 'primary' - if options[:header_icon] - options[:header_icon] = icon(options[:header_icon], class: 'margin-r-1-2') - end - render 'util/modal', options: options
git show [commit SHA] What other code was added at the same time? git log --follow -- [file] How was the other code changed over time? git bisect start/good/bad/reset What is the relevant change that justifies the deletion? 🎨✂👩💻 16 of 16 The art of deleting code A list of helpful git commands git stash --include-untracked Pause your current feature work git commit Write a meaningful message that includes all the relevant SHA to help the reviewers git stash apply Resume your current feature work