mirror of
https://github.com/nextcloud/documentation.git
synced 2026-01-03 02:09:45 +07:00
Merge pull request #461 from owncloud/code-update
keeping multi-repo up to date with commands
This commit is contained in:
@@ -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 --rebase' \;
|
||||
|
||||
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' \;
|
||||
|
||||
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/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user