From 11eca7be93f65bdd95af3c15848c44facd8d7924 Mon Sep 17 00:00:00 2001 From: Volkan Gezer Date: Sat, 2 Aug 2014 15:10:54 +0200 Subject: [PATCH 1/3] 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 e4e336220..4e116c815 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 -type d -name .git -exec sh -c 'cd "{}"/../ && pwd && ' \; + +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/ From 6cd4596b87f0957a6363e39eec3f6bb44812d46a Mon Sep 17 00:00:00 2001 From: Volkan Gezer Date: Sat, 2 Aug 2014 15:17:58 +0200 Subject: [PATCH 2/3] typo --- developer_manual/general/devenv.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/developer_manual/general/devenv.rst b/developer_manual/general/devenv.rst index 4e116c815..610197539 100644 --- a/developer_manual/general/devenv.rst +++ b/developer_manual/general/devenv.rst @@ -95,7 +95,7 @@ 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:: +or to prune all merged branches, you would execute this:: find . -maxdepth 3 -type d -name .git -exec sh -c 'cd "{}"/../ && pwd && git remote prune origin' \; From 61b7431ff03c10ddab7a2888dbeefda7eec9b167 Mon Sep 17 00:00:00 2001 From: Volkan Gezer Date: Mon, 4 Aug 2014 14:36:13 +0200 Subject: [PATCH 3/3] add rebase option --- developer_manual/general/devenv.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/developer_manual/general/devenv.rst b/developer_manual/general/devenv.rst index 610197539..c016fd714 100644 --- a/developer_manual/general/devenv.rst +++ b/developer_manual/general/devenv.rst @@ -93,7 +93,7 @@ If you have more than one repository cloned, it can be time consuming to do the 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' \; + find . -maxdepth 3 -type d -name .git -exec sh -c 'cd "{}"/../ && pwd && git pull --rebase' \; or to prune all merged branches, you would execute this::