Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

Commit

Permalink
LQF-24 documentation on project update (#14)
Browse files Browse the repository at this point in the history
* Adding instructions on project update

* Fix typo error

* Add fetch tag section

* formatting correction

Co-authored-by: Maude Cahuet <[email protected]>
Co-authored-by: Lan Huong Mai <[email protected]>
  • Loading branch information
3 people authored Dec 14, 2021
1 parent 0d446d7 commit e9f201a
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,33 @@ Or, if you prefer to keep what you made, you can continue working on a new branc

git checkout exercise-5-solution -b my-new-branchname

## Update the project

Project solutions are managed with tags.
To update the project correctly I strongly recommend you to make multiple commits rather than a big one.
The reason is that there is a script in the project `retag.sh` that is creating all solutions tags according git log history.
So to be sure that the modification you have done are in the correct exercise and tags you should follow those steps:

1. Make your changes in a dedicated branch that will be merged into main.
2. Once the branch is merged go on main branch and start an interactive rebase with this command: `git rebase -i --root`
the `--root` allow you to rebase from the first commit of the project.
3. Place your modification commits where they belong. So for example a modification on exercise instruction should be
placed after the first commit (it will be squash), and a modification on exercise solution should be placed
after the commit of the exercise solution (e.g. Solution of Exercise 7).
4. When every commit are in place change the verb at the start of the line from `pick` to `fixup` it will squash
with the precedent commit and keep the old commit message (to allow retag.sh to do it's job).
5. After this you can save and quit interactive rebase
6. Now your git history is clean and should be as the same as before. You can now execute `retag.sh`.
7. Now you can push your branch and tags by doing `git push -f` and `git push -f --tags `.

If the project has been updated and you want to fetch the new exercises tags :

1. git fetch --force --tags
2. git pull --force --tags

or
1. remove the tags locally: git tag -l | xargs git tag -d
2. fetch the tags : git fetch --tags

Thanks for your contribution !

0 comments on commit e9f201a

Please sign in to comment.