documnted developing process in the readme
This commit is contained in:
parent
5f956a4e81
commit
5138e67908
81
README.md
81
README.md
|
@ -1,3 +1,84 @@
|
|||
# Gridspinoza theme
|
||||
|
||||
Theme based up on BootStrap modified for the [GridSpinoza](https://gridspinoza.net) website, as part of the [Hangar](https://hangar.org)network.
|
||||
|
||||
|
||||
## Development / modifications
|
||||
|
||||
The repo is cloned inside the servers theme, but from ther we have no writing permissions in the git repository, so the development is always done locally, then pushed to [Hangar Git](http://git.hangar.org) and from the server they are `pulled`.
|
||||
|
||||
In our computer (localhost):
|
||||
```
|
||||
git clone ssh://git@git.hangar.org:21036/hangar-tech/gridspinoza.git
|
||||
```
|
||||
|
||||
|
||||
## Appliying changes in server
|
||||
|
||||
Before we did prepare the content by https cloning the repo `git clone https://git.hangar.org/hangar-tech/gridspinoza.git` and changing file permissions to server needs.
|
||||
|
||||
Go to the theme directory:
|
||||
```
|
||||
cd /var/www/html/sites/all/themes/gridspinoza
|
||||
```
|
||||
|
||||
|
||||
from there checkout the `main` branch and `pull`
|
||||
```
|
||||
git checkout main
|
||||
git pull
|
||||
```
|
||||
|
||||
### checking changes before apply
|
||||
We can create different branches locally, then push them and in the server preview before applying to main.
|
||||
|
||||
For example, need to fix "font-size" some were.
|
||||
|
||||
#### local host
|
||||
|
||||
checkout main repo and be up to date
|
||||
|
||||
```
|
||||
git checkout main
|
||||
git status
|
||||
git pull
|
||||
```
|
||||
create new branch and check out
|
||||
```
|
||||
git branch fix/font-size
|
||||
git checkout fix/font-size
|
||||
```
|
||||
start doing changes and commit and push them to server
|
||||
|
||||
#### in the sever
|
||||
Pull changes
|
||||
|
||||
```
|
||||
cd /var/www/html/sites/all/themes/gridspinoza
|
||||
git fetch --all
|
||||
git checkout fix/font-size
|
||||
git pull
|
||||
```
|
||||
now you can refresh the browser and eventually fix more things.
|
||||
|
||||
if you like it then do as next:
|
||||
|
||||
sever: `git checkout main`
|
||||
|
||||
localhost:
|
||||
- `git fetch all` to get all changes
|
||||
- in the _fix/font-size_ branch do `git merge main`
|
||||
- if ok, then go to _main_ branch `git checkout main`
|
||||
- merge changes `git merge fix/font-size`
|
||||
- publish the changes `git push`
|
||||
|
||||
go to the server, inside the theme directory `git fetch --all` and then `git checkout main` and finally `git pull`
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
|
||||
<!-- @file Instructions on how to sub-theme the Drupal Bootstrap base theme using the CDN Starterkit. -->
|
||||
<!-- @defgroup subtheme_cdn -->
|
||||
<!-- @ingroup subtheme -->
|
||||
|
|
Loading…
Reference in New Issue