Skip to content

Instantly share code, notes, and snippets.

@watagashi watagashi/file0.txt
Last active Dec 22, 2017

Embed
What would you like to do?
Git guilt によるパッチ管理 ref: https://qiita.com/watagashi/items/44c03f702b54d28438fb
% git clone http://repo.or.cz/guilt.git
Cloning into 'guilt'...
remote: Counting objects: 3844, done.
remote: Total 3844 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (3844/3844), 624.05 KiB | 152.00 KiB/s, done.
Resolving deltas: 100% (2864/2864), done.
% make install
install -d /usr/local/bin/
install -m 755 guilt /usr/local/bin/
install -d /usr/local/lib/guilt/
install -m 755 guilt-add guilt-applied guilt-branch guilt-commit guilt-delete guilt-diff guilt-export guilt-files guilt-fold guilt-fork guilt-graph guilt-guard guilt-header guilt-help guilt-import guilt-import-commit guilt-init guilt-new guilt-next guilt-patchbomb guilt-pop guilt-prev guilt-push guilt-rebase guilt-refresh guilt-repair guilt-rm guilt-select guilt-series guilt-status guilt-top guilt-unapplied /usr/local/lib/guilt/
install -m 644 os.Darwin os.FreeBSD os.Linux os.SunOS /usr/local/lib/guilt/
% git remote
origin
% guilt diff
diff --git a/index.html b/index.html
index 98accc3..394d1ca 100644
--- a/index.html
+++ b/index.html
@@ -12,6 +12,12 @@
<!-- Theme used for syntax highlighting of code -->
<link rel="stylesheet" href="lib/css/zenburn.css">
+ <style type="text/css">
+ .reveal code {
+ font-family: "Source Code Pro", "Courier New", monospace;
+ }
+ </style>
+
<!-- Printing and PDF exports -->
<script>
var link = document.createElement( 'link' );
% git status
On branch guilt/master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: index.html
no changes added to commit (use "git add" and/or "git commit -a")
% guilt refresh
Patch code-font refreshed
% guilt new hide-controls
% guilt diff
diff --git a/index.html b/index.html
index 394d1ca..331fee6 100644
--- a/index.html
+++ b/index.html
@@ -43,6 +43,7 @@
// - https://github.com/hakimel/reveal.js#configuration
// - https://github.com/hakimel/reveal.js#dependencies
Reveal.initialize({
+ controls: false,
dependencies: [
{ src: 'plugin/markdown/marked.js' },
{ src: 'plugin/markdown/markdown.js' },
% guilt refresh
Patch hide-controls refreshed
% git log master..HEAD --oneline
43af056 (HEAD -> guilt/master, refs/patches/master/hide-controls) patch hide-controls
1838f54 (refs/patches/master/code-font) patch code-font
% guilt series
code-font
hide-controls
% guilt pop
Now at code-font.
% guilt
Guilt v0.36
Pick a command:
add files import prev series
applied fold import-commit push status
branch fork init rebase top
commit graph new refresh unapplied
delete guard next repair
diff header patchbomb rm
export help pop select
Example:
guilt push
% git diff master
diff --git a/index.html b/index.html
index 98accc3..394d1ca 100644
--- a/index.html
+++ b/index.html
@@ -12,6 +12,12 @@
<!-- Theme used for syntax highlighting of code -->
<link rel="stylesheet" href="lib/css/zenburn.css">
+ <style type="text/css">
+ .reveal code {
+ font-family: "Source Code Pro", "Courier New", monospace;
+ }
+ </style>
+
<!-- Printing and PDF exports -->
<script>
var link = document.createElement( 'link' );
% guilt applied # 適用されているパッチ
code-font
% guilt unapplied # 適用されていないパッチ
hide-controls
% guilt series # 全てのパッチ
code-font
hide-controls
% git diff
diff --git a/index.html b/index.html
index 108a274..c31d574 100644
--- a/index.html
+++ b/index.html
@@ -14,7 +14,7 @@
<style type="text/css">
.reveal code {
- font-family: "Source Code Pro", "Courier New", monospace;
+ font-family: "Source Han Code JP", "Source Code Pro", "Courier New", monospace;
}
</style>
% guilt refresh
Patch code-font refreshed
% git diff HEAD~
diff --git a/index.html b/index.html
index 98accc3..108a274 100644
--- a/index.html
+++ b/index.html
@@ -12,6 +12,12 @@
<!-- Theme used for syntax highlighting of code -->
<link rel="stylesheet" href="lib/css/zenburn.css">
+ <style type="text/css">
+ .reveal code {
+ font-family: "Source Han Code JP", "Source Code Pro", "Courier New", monospace;
+ }
+ </style>
+
<!-- Printing and PDF exports -->
<script>
var link = document.createElement( 'link' );
% guilt push
Applying patch..hide-controls
Patch applied.
% guilt applied
code-font
hide-controls
% guilt unapplied
% guilt pop -a
All patches popped.
% guilt push --all
Applying patch..code-font
Patch applied.
Applying patch..hide-controls
Patch applied.
% guilt branch dev
Switched to branch 'dev'
% guilt series
code-font
hide-controls
% git clone https://github.com/hakimel/reveal.js.git
Cloning into 'reveal.js'...
remote: Counting objects: 10252, done.
remote: Total 10252 (delta 0), reused 0 (delta 0), pack-reused 10252
Receiving objects: 100% (10252/10252), 7.68 MiB | 450.00 KiB/s, done.
Resolving deltas: 100% (5648/5648), done.
% cd reveal.js
% ls -F
.git/ README.md lib/
.gitignore bower.json package.json
.travis.yml css/ plugin/
CONTRIBUTING.md demo.html test/
Gruntfile.js index.html
LICENSE js/
% git branch -u origin/dev
Branch 'dev' set up to track remote branch 'dev' from 'origin'.
% git reset --hard origin/dev
HEAD is now at 0c946ae fix missing theme line-height when printing #1967
% guilt push -a
Applying patch..code-font
Patch applied.
Applying patch..hide-controls
Patch applied.
% ls -F .git
HEAD description index logs/ packed-refs
config hooks/ info/ objects/ refs/
$ guilt init
% ls -F .git
HEAD hooks/ logs/ patches/
config index objects/ refs/
description info/ packed-refs
% ls -F -R .git/patches
master/
.git/patches/master:
series status
% guilt new code-font
% git status
On branch guilt/master
nothing to commit, working tree clean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.