aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--binary.txt2
-rw-r--r--debug.txt2
-rw-r--r--emacs.txt5
-rw-r--r--explore-elf.txt2
-rw-r--r--gdb.txt2
-rw-r--r--git.txt120
-rw-r--r--radare2.txt2
-rw-r--r--runtime-ld.txt2
8 files changed, 78 insertions, 59 deletions
diff --git a/binary.txt b/binary.txt
index 6445d2a..ad900b3 100644
--- a/binary.txt
+++ b/binary.txt
@@ -1,4 +1,4 @@
-.:: Binary ::.
+# binary
--------------------------------------------------------------------------------
# toc
diff --git a/debug.txt b/debug.txt
index 30dd94c..0c67a88 100644
--- a/debug.txt
+++ b/debug.txt
@@ -1,4 +1,4 @@
-.:: debugging ::.
+# debugging
--------------------------------------------------------------------------------
#
diff --git a/emacs.txt b/emacs.txt
index c65991e..da9613e 100644
--- a/emacs.txt
+++ b/emacs.txt
@@ -1,4 +1,4 @@
-.:: Emacs ::.
+# emacs
--------------------------------------------------------------------------------
# toc
@@ -70,4 +70,5 @@
C-c C-c eval source block
--------------------------------------------------------------------------------
-Vim:sts=2:et:tw=80:cc=80:fo+=t:ft=help
+vim:sts=2:et:tw=80:cc=80:fo+=t:ft=help
+
diff --git a/explore-elf.txt b/explore-elf.txt
index e22f708..65684d8 100644
--- a/explore-elf.txt
+++ b/explore-elf.txt
@@ -1,4 +1,4 @@
-.:: Explore Elf ::.
+# explore elf
--------------------------------------------------------------------------------
# toc
diff --git a/gdb.txt b/gdb.txt
index 37b6b48..f569de8 100644
--- a/gdb.txt
+++ b/gdb.txt
@@ -1,4 +1,4 @@
-.:: GDB ::.
+# gdb
--------------------------------------------------------------------------------
# toc
diff --git a/git.txt b/git.txt
index 9cc7a86..59d1a64 100644
--- a/git.txt
+++ b/git.txt
@@ -1,67 +1,85 @@
-/* git help */
+# git
+------------------------------------------------------------------------------------------------------------------------
- - remote
- git remote -v list remotes verbose (with URLs)
- git remote show [-n] <remote> list info for <remote> (like remote HEAD, remote branches, tracking mapping)
- -n show available info without contacting remote (offline mode)
+# toc
+ |remote|
+ |branching|
+ |resetting|
+ |tags|
+ |diff|
+ |log|
+ |patching|
+ |revision_range|
- - branching
- git branch [-a] list available branches; -a to include remote branches
- git branch -vv list branch & annotate with head sha1 & remote tracking branch
- git branch <bname> create branch with name <bname>
- git checkout <bname> switch to branch with name <bname>
- git push -u origin <rbname> push branch to origin (or other remote), and setup <rbname> as tracking branch
+ - *remote*
+ git remote -v ............................... list remotes verbose (with URLs)
+ git remote show [-n] <remote> ............... list info for <remote> (like remote HEAD, remote branches,
+ tracking mapping)
- - resetting
- git reset [type] <ref|commit>
- type:
- --mixed resets index, but not working tree
- --hard matches the working tree and index to that of the tree being switched to
- any changes to tracked files in the working tree since <commit> are lost
- git reset HEAD <file> remove file from staging
- git reset --soft HEAD~1 delete most recent commit but keep work
- git reset --hard HEAD~1 delete most recent commit and delete work
+ - *branching*
+ git branch [-a] ............................. list available branches; -a to include remote branches
+ git branch -vv .............................. list branch & annotate with head sha1 & remote tracking branch
+ git branch <bname> .......................... create branch with name <bname>
+ git checkout <bname> ........................ switch to branch with name <bname>
+ git push -u origin <rbname> ................. push branch to origin (or other remote), and setup <rbname> as
+ tracking branch
- - tags
- git tag -a <tname> -m "descr" creates an annotated tag (full object containing tagger, date, ...)
- git tag -l list available tags
- git checkout tag/<tname> checkout specific tag
- git checkout tag/<tname> -b <bname> checkout specific tag in a new branch
+ - *resetting*
+ git reset [opt] <ref|commit>
+ opt:
+ --mixed ................................. resets index, but not working tree
+ --hard .................................. matches the working tree and index to that of the tree being
+ switched to any changes to tracked files in the working tree since
+ <commit> are lost
+ git reset HEAD <file> ....................... remove file from staging
+ git reset --soft HEAD~1 ..................... delete most recent commit but keep work
+ git reset --hard HEAD~1 ..................... delete most recent commit and delete work
- - diff
- git diff HEAD:<fname> origin/HEAD:<fname> diff files for different refs
- git diff -U$(wc -l <fname>) <fname> shows complete file with diffs instead of usual diff snippets
+ - *tags*
+ git tag -a <tname> -m "descr" ............... creates an annotated tag (full object containing tagger, date, ...)
+ git tag -l .................................. list available tags
+ git checkout tag/<tname> .................... checkout specific tag
+ git checkout tag/<tname> -b <bname> ......... checkout specific tag in a new branch
- - log
- git log --oneline shows log in single line per commit -> alias for '--pretty=oneline --abbrev-commit'
- git log --graph text based graph of commit history
- git log --decorate decorate log with REFs
+ - *diff*
+ git diff HEAD:<fname> origin/HEAD:<fname> ... diff files for different refs
+ git diff -U$(wc -l <fname>) <fname> ......... shows complete file with diffs instead of usual diff snippets
- - patching
+ - *log*
+ git log --oneline ........................... shows log in single line per commit -> alias for '--pretty=oneline
+ --abbrev-commit'
+ git log --graph ............................. text based graph of commit history
+ git log --decorate .......................... decorate log with REFs
+
+ - *patching*
git format-patch <opt> <since>/<revision range>
- opt:
- -N use [PATCH] even with multiple patches (default is [PATCH n/m]
- where n is current commit num and m is total commit num in patch)
- --start-number <n> start output file generation with <n> as start number instead '1'
- since spcifier:
- -3 e.g: create a patch from last three commits
- <comit hash> create patch with commits starting after <comit hash>
+ opt:
+ -N ...................................... use [PATCH] even with multiple patches (default is [PATCH n/m]
+ where n is current commit num and m is total commit num in patch)
+ --start-number <n> ...................... start output file generation with <n> as start number instead '1'
+ since spcifier:
+ -3 ...................................... e.g: create a patch from last three commits
+ <comit hash> ............................ create patch with commits starting after <comit hash>
- git am <patch> apply patch and create a commit for it
+ git am <patch> .............................. apply patch and create a commit for it
- git apply --stat <PATCH> see which files the patch would change
- git apply --check <PATCH> see if the patch can be applied cleanly
- git apply <PATCH> apply the patch locally without creating a commit
+ git apply --stat <PATCH> .................... see which files the patch would change
+ git apply --check <PATCH> ................... see if the patch can be applied cleanly
+ git apply <PATCH> ........................... apply the patch locally without creating a commit
# eg: generate patches for each commit from initial commit on
git format-patch -N $(git rev-list --max-parents=0 HEAD)
- # generate single patch file from a certain commit/ref
- git format-patch <COMMIT/REF> --stdout > my-patch.patch
+ # generate single patch file from a certain commit/ref
+ git format-patch <COMMIT/REF> --stdout > my-patch.patch
+
+ - *revision_range*
+ HEAD ........................................ last commit
+ HEAD~1 ...................................... last commit-1
+ HEAD~N ...................................... last commit-N (linear backwards when in tree structure, check
+ difference between HEAD^ and HEAD~)
+ git rev-list --max-parents=0 HEAD ........... first commit
- - <revision range>
- HEAD last commit
- HEAD~1 last commit-1
- HEAD~N last commit-N (linear backwards when in tree structure, check difference between HEAD^ and HEAD~)
- git rev-list --max-parents=0 HEAD first commit
+------------------------------------------------------------------------------------------------------------------------
+vim:sts=2:et:tw=120:cc=120:fo+=t:ft=help:
diff --git a/radare2.txt b/radare2.txt
index 1706d77..1373737 100644
--- a/radare2.txt
+++ b/radare2.txt
@@ -1,4 +1,4 @@
-.:: radare2 ::.
+# radare2
--------------------------------------------------------------------------------
# toc
diff --git a/runtime-ld.txt b/runtime-ld.txt
index 7c7a5b8..3a9b2a3 100644
--- a/runtime-ld.txt
+++ b/runtime-ld.txt
@@ -1,4 +1,4 @@
-.:: Runtime ld ::.
+# runtime ld
--------------------------------------------------------------------------------
# toc