ericbarch / dockuwiki

A wiki that syncs with git...in a box!
75 stars 17 forks source link

Force gitpush #8

Closed maximuskowalski closed 5 years ago

maximuskowalski commented 5 years ago

Is it possible to force an upload? I currently have this non-error but my last 29 additions have not made it to git. I may have caused this by trying to install two different instances, one local and one remote.

Backing up wiki @ Wed Aug 21 01:38:43 UTC 2019
On branch master
Your branch is ahead of 'origin/master' by 29 commits.
(use "git push" to publish your local commits)
nothing to commit, working tree clean
ericbarch commented 5 years ago

Hi @maximuskowalski,

You could certainly use the docker exec command to drop yourself into a shell inside the container and execute any git command(s) you desire. But if you did run two instances simultaneously, you will very likely run into merge conflicts when you attempt to sync up the repo again (which may very well break dokuwiki 🤕).

There are certainly some rough edges with using dokuwiki with git like this, so we could certainly improve this going forward. It may actually be safest to manually reconcile the differences (e.g. copy/pasting your modified pages into a freshly cloned instance).

You may want to docker exec into the container, create a new branch, and then push that to your remote. You could then diff the branches and see exactly what changed (and what appears safe to copy over to master).

maximuskowalski commented 5 years ago

Thank you.