# Git Process

### Compiled Assets

When updating the theme, Galaxy only compile the SCSS with the entry point `sass/main.scss`

For Javascript inside the theme, it's not compiled by Galaxy, so before updating the theme on production, make sure to have the Javascript compiled & minified in the repo.

* **For theme updated using `git pull`**

Make sure that master branch always contains a minified version of the JS files inside public folder.

* **For theme updated using export / import feature**

If you prefer, you could choose to only recompile the JS before doing an export. Please note that we still advise to keep a compiled version of the JS inside the repo, just in case someone forgets to re-compile it before doing the export.

Advices:

You have 2 ways of doing it:\
A/ Do it when you have finish your ticket, before each commit (if the commit has a JS change). It's longer to do it this way, but at least you're sure it's always done, it becomes a habit \
\&#xNAN;*or*\
B/ If it's too time consuming, after you finish done all your commits, re-compile the JS and do an additional commit "Minify JS". This way, when we put the theme on production, it will have the minified version of the JS&#x20;

### Git pull / Changing branch

{% hint style="danger" %}
As we are working remotely on a server, **always make sure to re-sync your files** after doing a git pull or changing a branch.
{% endhint %}

## The below part is for xo7 & its vendors

Internal checklist:

* [ ] **Compile JS:** before doing the commit, re-compile JS with `npm run prod` and make sure to commit the compiled JS\\

* [ ] **Separate commit:** Try to do 1 commit (or more) = 1 ticket, so it's easy to understand why a change was made, or to revert a commit / cherry-pick it\\

* [ ] **Commit name:** Include in the commit name a reference to the commit ID if there is one. \
  For example \
  "*1163064399490184 Add read more on introduction*" or \
  "*Add read more on introduction - 1163064399490184*", or \
  add the ticket link on the second line of the commit name.. \
  Once again, the idea is to make it easier to know why a change was introduced, re-find the logic / discussions around it, easily know what will go on preprod / prod, etc...\\
