aboutsummaryrefslogtreecommitdiffhomepage
path: root/git.html
diff options
context:
space:
mode:
authorjohannst <johannst@users.noreply.github.com>2020-03-19 21:21:17 +0000
committerjohannst <johannst@users.noreply.github.com>2020-03-19 21:21:17 +0000
commitf7f091a2e6d3167fed4e1063dea266cdfff3ab55 (patch)
tree9d9a30800547ff11a9ab5fd13c11feeae7fba792 /git.html
parent678362c55acefe62bdacee22926db4edf65efc7e (diff)
downloadnotes-f7f091a2e6d3167fed4e1063dea266cdfff3ab55.tar.gz
notes-f7f091a2e6d3167fed4e1063dea266cdfff3ab55.zip
deploy: 6259d4ee6c06cc6ae4ce07484b75f7d327a6a52a
Diffstat (limited to 'git.html')
-rw-r--r--git.html11
1 files changed, 8 insertions, 3 deletions
diff --git a/git.html b/git.html
index da23bb0..5b887d9 100644
--- a/git.html
+++ b/git.html
@@ -81,7 +81,7 @@
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div id="sidebar-scrollbox" class="sidebar-scrollbox">
- <ol class="chapter"><li class="expanded "><a href="ld.so.html"><strong aria-hidden="true">1.</strong> ld.so</a></li><li class="expanded "><a href="git.html" class="active"><strong aria-hidden="true">2.</strong> git</a></li><li class="expanded "><a href="tmux.html"><strong aria-hidden="true">3.</strong> tmux</a></li><li class="expanded "><a href="awk.html"><strong aria-hidden="true">4.</strong> awk</a></li><li class="expanded "><a href="gdb.html"><strong aria-hidden="true">5.</strong> gdb</a></li><li class="expanded "><a href="radare2.html"><strong aria-hidden="true">6.</strong> radare2</a></li><li class="expanded "><a href="emacs.html"><strong aria-hidden="true">7.</strong> emacs</a></li><li class="expanded "><a href="fish.html"><strong aria-hidden="true">8.</strong> fish</a></li><li class="expanded "><a href="strace.html"><strong aria-hidden="true">9.</strong> strace</a></li><li class="expanded "><a href="lsof.html"><strong aria-hidden="true">10.</strong> lsof</a></li><li class="expanded "><a href="pidstat.html"><strong aria-hidden="true">11.</strong> pidstat</a></li><li class="expanded "><a href="time.html"><strong aria-hidden="true">12.</strong> time</a></li><li class="expanded "><a href="pgrep.html"><strong aria-hidden="true">13.</strong> pgrep</a></li><li class="expanded "><a href="pstack.html"><strong aria-hidden="true">14.</strong> pstack</a></li><li class="expanded "><a href="pstack.html"><strong aria-hidden="true">15.</strong> pstack</a></li><li class="expanded "><a href="perf.html"><strong aria-hidden="true">16.</strong> perf</a></li><li class="expanded "><a href="oprofile.html"><strong aria-hidden="true">17.</strong> OProfile</a></li><li class="expanded "><a href="od.html"><strong aria-hidden="true">18.</strong> od</a></li><li class="expanded "><a href="xxd.html"><strong aria-hidden="true">19.</strong> xxd</a></li><li class="expanded "><a href="readelf.html"><strong aria-hidden="true">20.</strong> readelf</a></li><li class="expanded "><a href="objdump.html"><strong aria-hidden="true">21.</strong> objdump</a></li><li class="expanded "><a href="nm.html"><strong aria-hidden="true">22.</strong> nm</a></li><li class="expanded "><a href="c++filt.html"><strong aria-hidden="true">23.</strong> c++filt</a></li></ol>
+ <ol class="chapter"><li class="expanded "><a href="ld.so.html"><strong aria-hidden="true">1.</strong> ld.so</a></li><li class="expanded "><a href="git.html" class="active"><strong aria-hidden="true">2.</strong> git</a></li><li class="expanded "><a href="tmux.html"><strong aria-hidden="true">3.</strong> tmux</a></li><li class="expanded "><a href="awk.html"><strong aria-hidden="true">4.</strong> awk</a></li><li class="expanded "><a href="gdb.html"><strong aria-hidden="true">5.</strong> gdb</a></li><li class="expanded "><a href="radare2.html"><strong aria-hidden="true">6.</strong> radare2</a></li><li class="expanded "><a href="emacs.html"><strong aria-hidden="true">7.</strong> emacs</a></li><li class="expanded "><a href="fish.html"><strong aria-hidden="true">8.</strong> fish</a></li><li class="expanded "><a href="strace.html"><strong aria-hidden="true">9.</strong> strace</a></li><li class="expanded "><a href="lsof.html"><strong aria-hidden="true">10.</strong> lsof</a></li><li class="expanded "><a href="pidstat.html"><strong aria-hidden="true">11.</strong> pidstat</a></li><li class="expanded "><a href="time.html"><strong aria-hidden="true">12.</strong> time</a></li><li class="expanded "><a href="pgrep.html"><strong aria-hidden="true">13.</strong> pgrep</a></li><li class="expanded "><a href="pstack.html"><strong aria-hidden="true">14.</strong> pstack</a></li><li class="expanded "><a href="perf.html"><strong aria-hidden="true">15.</strong> perf</a></li><li class="expanded "><a href="oprofile.html"><strong aria-hidden="true">16.</strong> OProfile</a></li><li class="expanded "><a href="od.html"><strong aria-hidden="true">17.</strong> od</a></li><li class="expanded "><a href="xxd.html"><strong aria-hidden="true">18.</strong> xxd</a></li><li class="expanded "><a href="readelf.html"><strong aria-hidden="true">19.</strong> readelf</a></li><li class="expanded "><a href="objdump.html"><strong aria-hidden="true">20.</strong> objdump</a></li><li class="expanded "><a href="nm.html"><strong aria-hidden="true">21.</strong> nm</a></li><li class="expanded "><a href="c++filt.html"><strong aria-hidden="true">22.</strong> c++filt</a></li><li class="expanded "><a href="c++.html"><strong aria-hidden="true">23.</strong> c++</a></li><li class="expanded "><a href="glibc.html"><strong aria-hidden="true">24.</strong> glibc</a></li><li class="expanded "><a href="gcc.html"><strong aria-hidden="true">25.</strong> gcc</a></li></ol>
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
@@ -196,7 +196,10 @@
'--pretty=oneline --abbrev-commit'
git log --graph ...... text based graph of commit history
git log --decorate ... decorate log with REFs
- git log -p &lt;file&gt; .... show commit history + diffs for &lt;file&gt;
+</code></pre>
+<h2><a class="header" href="#file-history" id="file-history">File history</a></h2>
+<pre><code class="language-markdown"> git log -p &lt;file&gt; ......... show commit history + diffs for &lt;file&gt;
+ git log --oneline &lt;file&gt; .. show commit history for &lt;file&gt; in compact format
</code></pre>
<h2><a class="header" href="#patching" id="patching">Patching</a></h2>
<pre><code class="language-markdown"> git format-patch &lt;opt&gt; &lt;since&gt;/&lt;revision range&gt;
@@ -208,7 +211,7 @@
number instead '1'
since spcifier:
-3 .................. e.g: create a patch from last three commits
- &lt;comit hash&gt; ........ create patch with commits starting after &lt;comit hash&gt;
+ &lt;commit hash&gt; ....... create patch with commits starting after &lt;commit hash&gt;
git am &lt;patch&gt; ......... apply patch and create a commit for it
@@ -235,6 +238,8 @@
&lt;submod&gt;, this will pull
origin/HEAD or a branch specified
for the submodule
+ git diff --submodule ...................... show commits that are part of the
+ submodule diff
</code></pre>
<h2><a class="header" href="#inspection" id="inspection">Inspection</a></h2>
<pre><code class="language-markdown"> git ls-tree [-r] &lt;ref&gt; .... show git tree for &lt;ref&gt;, -r to recursively ls sub-trees