diff options
author | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2020-01-01 14:46:50 +0000 |
---|---|---|
committer | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2020-01-01 14:46:50 +0000 |
commit | d8b85fe8dc48fafe87b482ae36eb388a33c806f0 (patch) | |
tree | 34d0e266e7f7b7c10af86d642e03fcf8034dd107 | |
parent | 044fc66b9679cc4556d7d6c377d881a9d128afe2 (diff) |
Added step README-hacking's checklist to avoid merging dummy files
During the checklist we guide the user to delete the dummy `delete-me*'
files from their custom branch. Later, if the dummy files are updated in
the template's master branch, if the user merges with the template branch,
these files will be written back into their project! This is very annoying!
With this commit, a step was added in the `README-hacking.md' checklist,
just after deleting the dummy files to avoid this problem using the
`.gitattributes' file, telling Git to keep the changes as implemented in
the merging branch (`ours').
-rw-r--r-- | README-hacking.md | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/README-hacking.md b/README-hacking.md index 75d869c..f545fa0 100644 --- a/README-hacking.md +++ b/README-hacking.md @@ -653,6 +653,21 @@ First custom commit $ ./project make ``` + - Tell Git _not_ to merge changes in the dummy `delete-me` files (by + keeping their names in a `.gitattributes` file. Note that only the + first one is a `>` (to re-write the file), the rest are `>>` (to + append to it). After doing this step in your own branch, when future + commits of the template make a change in the dummy files, they will + not be imported into your project's branch (it can be annoying!). + + ```shell + $ echo "tex/src/delete-me.mk merge=ours" > .gitattributes + $ echo "tex/src/delete-me-demo.mk merge=ours" >> .gitattributes + $ echo "reproduce/analysis/make/delete-me.mk merge=ours" >> .gitattributes + $ echo "reproduce/analysis/config/delete-me-num.mk merge=ours" >> .gitattributes + $ git add .gitattributes + ``` + - **Copyright and License notice**: To be usable/modifiable by others after publication, _all_ the "copyright-able" files in your project (those larger than 10 lines) must have a copyright notice and license |