From 44a3fde5eee342053b59eac83d27e4649f31b97f Mon Sep 17 00:00:00 2001
From: Jens Georg <jens.georg@desy.de>
Date: Thu, 30 Aug 2018 09:42:59 +0200
Subject: [PATCH] Add easier steps to use the template

Not adding the repository as a remote simply makes it impossible to push
to it. Also this makes it mandatory to always fetch the changes from the
remote anyway since it is not locally mirrored.
---
 HowTo_project-template.md | 47 ++++++++++-----------------------------
 1 file changed, 12 insertions(+), 35 deletions(-)

diff --git a/HowTo_project-template.md b/HowTo_project-template.md
index b721c87..307c988 100644
--- a/HowTo_project-template.md
+++ b/HowTo_project-template.md
@@ -1,50 +1,26 @@
 This file descibes the intended way to use the template project.
 
-## Concept:
+## Concept
 The project template is merged via git. The idea is to have the whole
 project-template repository merged into the project which uses it, incl.
 all the history. Like this updates and improvements in the template
 scripts can easily be propagated to all client projects by simply
 merging the head of project template.
 
-## Instructions:
+## Instructions
 
-### Preparing your project to use the project template
-  -  Add the project template repository as a git remote to your project.
-     This only is done once for each local repository.
-     ```
-     $ git remote add project-template https://github.com/ChimeraTK/project-template.git
-     ```
-     We intentionally use the read-only https version here. Never write
-     to the project template from one of the client projects!
-
-  -  Update the remote on you hard disk so git knows what is in
-     project-template
-     ```
-     $ git remote update
-     ```
-
-  -  Merge the project template master into your project
-     ```
-     $ git merge project-template/master
-     ```
-     
-    Note:you can access the files provided in the cmake directory from your 
-    CMakeLists.txt after appending this location to your CMAKE_MODULE_PATH 
-    variable
-
-### Getting updates to the project template
+### Initial import and getting of the project template
+In your local git repository, issue:
   ```
-     $ git remote update
-     $ git merge project-template/master
+    $ git fetch https://github.com/ChimeraTK/project-template.git
+    $ git merge FETCH_HEAD
+```
 
-  ```
-  If you are on a different computer with a different checkout directory which does not have the remote added 
-  (check with 'git remote show'), you may have to repeat steps from the 
-  section: Preparing your project to use the project     template.
- 
+Note: you can access the files provided in the cmake directory from your 
+CMakeLists.txt after appending this location to your `CMAKE_MODULE_PATH`
+variable
 
-### Updating/Improving the project template.
+### Updating/Improving the project template
 
   - Never write to the project template from one of the client projects!  If
     you have improvements or additions to the project template, check out
@@ -61,3 +37,4 @@ merging the head of project template.
     project-template as a remote to your project, so you don't have to push
     untested changes. Be careful that everything is pushed to github when
     you are done in order not to lose consistency of the repositories.
+
-- 
GitLab