Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature-Request: Change workflow for versioning files Praktomat/src/settings/*.py #259

Open
ifrh opened this issue Feb 21, 2017 · 0 comments

Comments

@ifrh
Copy link
Contributor

ifrh commented Feb 21, 2017

Hi there,
I think it would be great, if we set very local setting files to become "branch save",
in a way, that merging branches didn't overwrite this settings.
I think the most obviously are the files devel.py and local.py inside Praktomat/src/settings/

To retain our current version of a file during a merge (a merge is always incoming, remember: we merge into the current branch), we need to make use of an oft-ignored Git feature: Git attributes.
[...]
What we’re interested in here is the merge attribute, that lets us map files to a [very simple shell based] merge driver, a command responsible for the actual merging of these files.
git config --global merge.ours.driver true
(Quoted from https://medium.com/@porteneuve/how-to-make-git-preserve-specific-files-while-merging-18c92343826b )

Now here is my example for a possible .gitattributes file at the root level of repo,
that would tell very local-specific files to use above merge-driver instead of the standard one:

echo 'Praktomat/src/settings/local.py merge=ours' >> .gitattributes
echo 'Praktomat/src/settings/devel.py merge=ours' >> .gitattributes
git add .gitattributes
git commit -m 'Praktomat-Merge: Preserve very local-specific files during merges'

But this also means that example files for them should be given, like there is a apache_praktomat_wsgi.conf in Praktomat/documentation.

Best regards,
Robert

physikerwelt added a commit to physikerwelt/Praktomat that referenced this issue May 12, 2017
When deploying praktomat via git changes to the file
/src/settings/local.py might cause merge conflicts.
A possible solution to this is to configure
the settings file in the apache config. For instance
```
SetEnv DJANGO_SETTINGS_MODULE settings.local
```

See also KITPraktomatTeam#259
physikerwelt added a commit to physikerwelt/Praktomat that referenced this issue May 12, 2017
When deploying praktomat via git changes to the file
/src/settings/local.py might cause merge conflicts.
A possible solution to this is to configure
the settings file in the apache config. For instance
```
SetEnv DJANGO_SETTINGS_MODULE settings.local
```

See also KITPraktomatTeam#259
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant