about summary refs log tree commit diff stats
path: root/dev/git.html
diff options
context:
space:
mode:
authorSilvino Silva <silvino@bk.ru>2016-11-18 16:43:30 +0000
committerSilvino Silva <silvino@bk.ru>2016-11-18 16:43:30 +0000
commitc970ba8612111b6d3cf8aa3cc4fff7e85f40666e (patch)
tree50783b9a858507a6d17111a71c9e7b5a045289fc /dev/git.html
parentc09682cd5a5dbb9897dcbfa5d9ad6b7507b01dbe (diff)
downloaddoc-c970ba8612111b6d3cf8aa3cc4fff7e85f40666e.tar.gz
git revision
Diffstat (limited to 'dev/git.html')
-rw-r--r--dev/git.html49
1 files changed, 48 insertions, 1 deletions
diff --git a/dev/git.html b/dev/git.html
index 5d65b32..de11de0 100644
--- a/dev/git.html
+++ b/dev/git.html
@@ -252,7 +252,16 @@
     $ git -D h-1.2.2
     </pre>
 
-    <h2 id="local">Local Workflow</h2>
+    <h2 id="local">2. Local Workflow</h2>
+
+    <h3 id="working">2.1. Working area</h3>
+
+    <p>Mark all deleted to commit;</p>
+
+    <pre>
+    $ git ls-files --deleted -z | xargs -0 git rm
+    </pre>
+
 
     <p>Mark all deleted to commit;</p>
 
@@ -260,6 +269,8 @@
     $ git ls-files --deleted -z | xargs -0 git rm
     </pre>
 
+    <h3 id="logdiff">2.2. Logs and commits</h3>
+
     <p>Last commit that affected current path</p>
 
     <pre>
@@ -274,6 +285,42 @@
     $ git checkout f000^ -- path/to/file
     </pre>
 
+    <h3 id="remote">2.3. Working with remotes</h3>
+
+    <p>Update all branches with remote;</p>
+
+    <pre>
+    $ 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
+    </pre>
+
+    <p>Future updates;</p>
+
+    <pre>
+    $ git fetch --all
+    $ git pull --all
+    </pre>
+
+    <p>Update local branches removed on remote set;</p>
+
+    <pre>
+    $ 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
+    </pre>
+
     <a href="index.html">Development Index</a>
     <p>This is part of the c9-doc Manual.
     Copyright (C) 2016