https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png

This should be one of the core features of Git, but for some reason it's impossible to figure out how to search for a string in your commit history and see the diffs that that string is in. Here's the best I've come up with:
To find which commits and which files a string was added or removed in:
git log -S'search string' --oneline --name-status
To see the diff of that
// ==UserScript== | |
// @name HTML5 video using VLC plugin | |
// @grant none | |
// @include * | |
// ==/UserScript== | |
function html5vlc(){ | |
var videos = document.getElementsByTagName("video"); | |
var embeds = new Array(videos.length); | |
for (var i = 0; i < videos.length; i++) { | |
var vlc = document.createElement("embed"); |
Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
##git mergetool
In the middle file (future merged file), you can navigate between conflicts with ]c
and [c
.
Choose which version you want to keep with :diffget //2
or :diffget //3
(the //2
and //3
are unique identifiers for the target/master copy and the merge/branch copy file names).
:diffupdate (to remove leftover spacing issues)
:only (once you’re done reviewing all conflicts, this shows only the middle/merged file)
/c_extension_module*.so | |
/build/* | |
/.do_built* | |
/log | |
/all.did |