[Pkg-owncloud-commits] [owncloud-doc] 02/36: keeping multi-repo up	to date with commands
    David Prévot 
    taffit at moszumanska.debian.org
       
    Thu Aug 21 16:43:00 UTC 2014
    
    
  
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud-doc.
commit 11eca7be93f65bdd95af3c15848c44facd8d7924
Author: Volkan Gezer <volkangezer at gmail.com>
Date:   Sat Aug 2 15:10:54 2014 +0200
    keeping multi-repo up to date with commands
---
 developer_manual/general/devenv.rst | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
diff --git a/developer_manual/general/devenv.rst b/developer_manual/general/devenv.rst
index e4e3362..4e116c8 100644
--- a/developer_manual/general/devenv.rst
+++ b/developer_manual/general/devenv.rst
@@ -84,6 +84,24 @@ To disable JavaScript and CSS caching debugging has to be enabled in :file:`core
 
   DEFINE('DEBUG', true);
 
+Keep the code up-to-date
+------------------------
+
+If you have more than one repository cloned, it can be time consuming to do the same the action to all repositories one by one. To solve this, you can use the following command template::
+
+  find . -maxdepth <DEPTH> -type d -name .git -exec sh -c 'cd "{}"/../ && pwd && <GIT COMMAND>' \;
+
+then, e.g. to pull all changes in all repositories, you only need this::
+
+  find . -maxdepth 3 -type d -name .git -exec sh -c 'cd "{}"/../ && pwd && git pull' \;
+
+or to prune all merged branched, you would execute this::
+
+  find . -maxdepth 3 -type d -name .git -exec sh -c 'cd "{}"/../ && pwd && git remote prune origin' \;
+
+It is even easier if you create alias from these commands in case you want to avoid retyping those each time you need them.
+
+
 .. _GitHub: https://github.com/owncloud
 .. _GitHub Help Page: https://help.github.com/
 
-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-doc.git
    
    
More information about the Pkg-owncloud-commits
mailing list