Update routine changed

Dieser Commit ist enthalten in:
andryyy 2017-06-21 19:39:34 +02:00
Ursprung 56eba211b4
Commit d9b04d7a77

Datei anzeigen

@ -1,56 +1,21 @@
There is no update routine. You need to refresh your pulled repository clone and apply your local changes (if any). Actually there are many ways to merge local changes. There is no update routine. You need to refresh your pulled repository clone and apply your local changes (if any). Actually there are many ways to merge local changes.
### Step 1, method 1 ### Step 1
Stash all local changes, pull changes from the remote master branch and apply your stash on top of it. You will most likely see warnings about non-commited changes; you can ignore them:
```
# Stash local changes
git stash
# Re-pull master
git pull
# Apply stash and remove it
git stash pop
```
### Step 1, method 2
Fetch new data from GitHub, commit changes and merge remote repository: Fetch new data from GitHub, commit changes and merge remote repository:
``` ```
# Get updates/changes # 1. Get updates/changes
git fetch git fetch origin master
# Add all changed files to local clone # 2. Add all changed files to local clone
git add -A git add -A
# Commit changes, ignore git complaining about username and mail address # 3. Commit changes, ignore git complaining about username and mail address
git commit -m "Local config at $(date)" git commit -m "Local config at $(date)"
# Merge changes # 4. Merge changes, prefere mailcow repository
git merge git merge -Xtheirs -Xpatience
```
If git complains about conflicts, solve them! Example: # If it conflicts with files that were deleted from the mailcow repository, just run...
``` git status --porcelain | grep -E "UD|DU" | awk '{print $2}' | xargs rm -v
CONFLICT (content): Merge conflict in data/web/index.php # ...and repeat step 2 and 3
```
Open `data/web/index.php`, solve the conflict, close the file and run `git add -A` + `git commit -m "Solved conflict"`.
### Step 1, method 3
Thanks to fabreg @ GitHub!
In case both methods do not work (for many reason like you're unable to fix the CONFLICTS or any other reasons) you can simply start all over again.
Keep in mind that all local changes _to configuration files_ will be lost. However, your volumes will not be removed.
- Copy mailcow.conf somewhere outside the mailcow-dockerized directory
- Stop and remove mailcow containers: `docker-compose down`
- Delete the directory or rename it
- Clone the remote repository again (`git clone https://github.com/mailcow/mailcow-dockerized && cd mailcow-dockerized`). **Pay attention** to this step - the folder must have the same name of the previous one!
- Copy back your previous `mailcow.conf` into the mailcow-dockerized folder
If you forgot to stop Docker before deleting the cloned directory, you can use the following commands:
```
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
``` ```
### Step 2 ### Step 2