diff options
-rw-r--r-- | dev/git.html | 49 | ||||
-rw-r--r-- | dev/index.html | 8 |
2 files changed, 55 insertions, 2 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 diff --git a/dev/index.html b/dev/index.html index 3d20e72..93b5246 100644 --- a/dev/index.html +++ b/dev/index.html @@ -24,7 +24,13 @@ <li><a href="git.html#hotfix">1.4. Hotfix</a></li> </ul> </li> - <li><a href="git.html#local">2. Local Workflow</a></li> + <li><a href="git.html#local">2. Local Workflow</a> + <ul> + <li><a href="git.html#working">2.1. Working area</a></li> + <li><a href="git.html#logdiff">2.2. Logs and commits</a></li> + <li><a href="git.html#remote">2.3. Working with remotes</a></li> + </ul> + </li> </ul> </li> </ul> |