Between releases, code to be deployed in testing instances should always be merged on deployment
> DISCUSS: should we rather have dev, stage and prod branches, which are always deployable on respective dokku instances?
### Checkout deployment to the local machine
Assuming you have set the lab.allmende.io upstream as origin, run:
$ git checkout -b deployment origin/deployment
Branch deployment set up to track remote branch deployment from origin.
Switched to a new branch 'deployment'
### Merging into deployment
It is recommended to branch during feature development. Branches should ideally relate to the issue or story being addressed, e.g. is49 for patches to address issue #49 or us35 to address user story #35 (on taiga).
Assuming that you kept the upstream and local in sync, you can opt to:
1. merge on lab by issuing a merge request
2. merge locally
#### Merge on lab
#### Merge locally
$ git checkout deployment
$ git merge is49
## Conflict resolution
If the code has meanwhile been changed by commits merged into the branch later than when you fetched it, it is probably that a merge conflict occurs. A conflict needs to be manually solved locally.
Check out where are the conflicting files:
$ git status -v
Edit the file(s) with your favorite text editor or IDE.
Do you see these lines?
<<<<<<< HEAD
=======
>>>>>>> lab/is49
Everything between <<==>> needs to be manually resolved. Please note that
=== is the mirror line
=== and >>> are both the ends of the corrupted blocks.
Once you are done inspecting the file logic and merging everything coherently, do:
$ git add [Alt + .]
$ git commit
$ git push
## Dokku deployment
See the other wiki page for instructions (TODO: merge/link here)