From c970ba8612111b6d3cf8aa3cc4fff7e85f40666e Mon Sep 17 00:00:00 2001 From: Silvino Silva Date: Fri, 18 Nov 2016 16:43:30 +0000 Subject: git revision --- dev/git.html | 49 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) (limited to 'dev/git.html') 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 -

Local Workflow

+

2. Local Workflow

+ +

2.1. Working area

+ +

Mark all deleted to commit;

+ +
+    $ git ls-files --deleted -z | xargs -0 git rm
+    
+

Mark all deleted to commit;

@@ -260,6 +269,8 @@ $ git ls-files --deleted -z | xargs -0 git rm +

2.2. Logs and commits

+

Last commit that affected current path

@@ -274,6 +285,42 @@
     $ git checkout f000^ -- path/to/file
     
+

2.3. Working with remotes

+ +

Update all branches with remote;

+ +
+    $ git fetch --all
+    $ git pull --all
+    
+ +

If you want to track all remotes run this line + and then the commands mentioned above;

+ +
+    $ for remote in `git branch -r`; do git branch --track ${remote#origin/} $remote; done
+    
+ +

Future updates;

+ +
+    $ git fetch --all
+    $ git pull --all
+    
+ +

Update local branches removed on remote set;

+ +
+    $ git config --global fetch.prune true
+    
+ + +

This will prune on fetch or you can keep it manually;

+ +
+    $ git remote prune origin
+    
+ Development Index

This is part of the c9-doc Manual. Copyright (C) 2016 -- cgit 1.4.1-2-gfad0