about summary refs log tree commit diff stats
path: root/dev
diff options
context:
space:
mode:
authorEden <edendeoliveira@gmail.com>2019-04-10 23:02:55 +0100
committerEden <edendeoliveira@gmail.com>2019-04-10 23:12:09 +0100
commitfdc231661647d4ca15ddf312e85b210eabd23e50 (patch)
tree36a1e267f434b3e5c6bafe9a57b0abf4fd82236e /dev
parent675126cad1cde96a6fcf63efdc1bd8b6f6ba22ad (diff)
parenta19f7c5f9f357102b469b2b44c3f0749e1345b11 (diff)
downloaddoc-fdc231661647d4ca15ddf312e85b210eabd23e50.tar.gz
doc release 0.5.2
Diffstat (limited to 'dev')
-rw-r--r--dev/git/work.html34
1 files changed, 17 insertions, 17 deletions
diff --git a/dev/git/work.html b/dev/git/work.html
index b57bfb5..7f97af5 100644
--- a/dev/git/work.html
+++ b/dev/git/work.html
@@ -58,28 +58,28 @@ gloga () {
     <p>Mark all deleted to commit;</p>
 
     <pre>
-$ git ls-files --deleted -z | xargs -0 git rm
+    $ git ls-files --deleted -z | xargs -0 git rm
     </pre>
 
     <p>Query last commit that affected current file path</p>
 
     <pre>
-$ git rev-list -n 1 HEAD -- .
-$ git show f000 path/to/file
-$ git diff --name-status f000 path/to/file
+    $ git rev-list -n 1 HEAD -- .
+    $ git show f000 path/to/file
+    $ git diff --name-status f000 path/to/file
     </pre>
 
     <p>Undo a file to specific commit</p>
 
     <pre>
-$ git checkout f000^ -- path/to/file
+    $ git checkout f000^ -- path/to/file
     </pre>
 
     <p>Join multiple commits into single one;</p>
 
     <pre>
-$ git log --oneline
-$ git rebase -i oldest_commit_to_rewrite
+    $ git log --oneline
+    $ git rebase -i oldest_commit_to_rewrite
     </pre>
 
     <h2 id="logdiff">2.2. Logs, diff commits</h2>
@@ -87,13 +87,13 @@ $ git rebase -i oldest_commit_to_rewrite
     <p>Create patch files to target branch/tag/ref;</p>
 
     <pre>
-$ git format-patch --no-prefix software-v0.0.1
+    $ git format-patch --no-prefix software-v0.0.1
     </pre>
 
     <p>Same using diff command;</p>
 
     <pre>
-$ diff orig file > file.patch
+    $ diff -u orig file > file.patch
     </pre>
 
     <h2 id="remote">2.3. Working with remotes</h2>
@@ -101,40 +101,40 @@ $ diff orig file > file.patch
     <p>Adding a new remote;</p>
 
     <pre>
-$ git remote add newremotename https://machine.example.org/repo.git
+    $ git remote add newremotename https://machine.example.org/repo.git
     </pre>
 
     <p>Update all branches with remote;</p>
 
     <pre>
-$ git fetch --all
-$ git pull --all
+    $ git fetch --all
+    $ git pull --all
     </pre>
 
     <p>If you want to track all remotes run this line
     and then the commands mentioned above;</p>
 
     <pre>
-$ for remote in `git branch -r`; do git branch --track ${remote#origin/} $remote; done
+    $ for remote in `git branch -r`; do git branch --track ${remote#origin/} $remote; done
     </pre>
 
     <p>Future updates;</p>
 
     <pre>
-$ git fetch --all
-$ git pull --all
+    $ git fetch --all
+    $ git pull --all
     </pre>
 
     <p>Update local branches removed on remote set;</p>
 
     <pre>
-$ git config --global fetch.prune true
+    $ git config --global fetch.prune true
     </pre>
 
     <p>This will prune on fetch or you can keep it manually;</p>
 
     <pre>
-$ git remote prune origin
+    $ git remote prune origin
     </pre>
 
     <p>When using gitolite as remote, check following documentation;</p>