# Fixing the scholarx repository branches

**URL:** <https://sef.discourse.group/t/fixing-the-scholarx-repository-branches/405>\
**Category:** ScholarX\
**Created:** [May 31, 2022, 12:13pm UTC](https://sef.discourse.group/t/fixing-the-scholarx-repository-branches/405 "2022-05-31T12:13:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![piumal1999](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/piumal1999/32/274_2.png) [@piumal1999](https://sef.discourse.group/u/piumal1999)\
**Post date:** [May 31, 2022, 12:13pm UTC](https://sef.discourse.group/t/fixing-the-scholarx-repository-branches/405/1 "2022-05-31T12:13:48Z")

</div>

As we discussed in the last meeting, we need to brush up the branches on scholarx frontend and backend repositories by removing the unnecessary branches.

In scholarx-frontend repository, we have 3 branches.

1. master
2. development
3. scholarx-feb-edition

Both `master` and `development` branches are outdated and `scholarx-feb-edition` is the branch which is being used for the current deployment. Previously (in scholarx summer edition), we used the `master` branch for deployment and did the releases with that branch. It is 6 commits ahead  
(due to the releases and merges) and 37 commits behind the `scholarx-feb-edition`. Currently, `development` branch is 0 commits ahead of other branches, so it is ok to be deleted.

So when brushing up the frontend branches, I suggest the following steps:

1. Delete the `development` branch
2. Merge the `scholarx-feb-edition` branch to `master` branch (Merge pull request from scholarx-feb-edition…)
3. Do a release from `master` branch (v1.6)
4. Update the deployment script to use the `master` branch instead of `scholarx-feb-edition` branch
5. Rename the `scholarx-feb-edition` branch to `development`

Expected outcome:

- Two frontend branches  
1. master - the stable version which is used for deployment  
2. development - unreleased version in development

Are we ok to go with this plan?  
Btw, do we have any need of keeping a separate `deployment` branch?

cc: @Gravewalker @anjisvj

---

<div class="post-metadata">

**Author:** ![piumal1999](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/piumal1999/32/274_2.png) [@piumal1999](https://sef.discourse.group/u/piumal1999)\
**Post date:** [May 31, 2022, 2:14pm UTC](https://sef.discourse.group/t/fixing-the-scholarx-repository-branches/405/2 "2022-05-31T14:14:18Z")

</div>

In the backend, we have 4 branches.

1. master
2. development
3. sx-february
4. sx-feb-demo

Previously (during scholarx summer), we used `master` branch to do the releases, `development` branch for the unreleased version, and a separate `deployment` branch for the deployment.  
Now, `master` branch is 4 commits ahead(due to releases and branch merges) and 54 commits behind. `development` branch is 0 commits ahead of other branches.

Currently, `sx-february` is the branch which is used for development and `sx-feb-demo` is the branch that is used for the deployment.

In the backend, configurations in `sx-february` branch and deployed version are a little bit different due to the database configuration. We use Postgres in deployment while using MySQL for development. So we may need to keep a separate branch for the deployment.

**My suggestions for brushing up backend branches:**

- Since the `development` branch is outdated and no longer used, we can directly delete it right now. (Later we can rename the `sx-february` branch to `development`)
- We can use the `master` branch for releases.

For deployment, which branch should we use? `master` or a separate branch called `deployment`?

---

<div class="post-metadata">

**Author:** ![anjisvj](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/anjisvj/32/9_2.png) [@anjisvj](https://sef.discourse.group/u/anjisvj)\
**Post date:** [June 9, 2022, 4:45am UTC](https://sef.discourse.group/t/fixing-the-scholarx-repository-branches/405/3 "2022-06-09T04:45:01Z")

</div>

Thank you @piumal1999 for the suggestions! I agree with your suggestions. What was the limitation of using MySQL with heroku?

---

<div class="post-metadata">

**Author:** ![piumal1999](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/piumal1999/32/274_2.png) [@piumal1999](https://sef.discourse.group/u/piumal1999)\
**Post date:** [June 9, 2022, 6:56am UTC](https://sef.discourse.group/t/fixing-the-scholarx-repository-branches/405/4 "2022-06-09T06:56:25Z")

</div>

> [@anjisvj](#):
>
> What was the limitation of using MySQL with heroku?

@anjisvj There’s a query limit in the ClearDB MySQL plugin(around 3600 queries per hour). It exceeds within a few minutes when multiple users use the platform simultaneously. So we used the Heroku Postgres plugin.

---

<div class="post-metadata">

**Author:** ![piumal1999](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/piumal1999/32/274_2.png) [@piumal1999](https://sef.discourse.group/u/piumal1999)\
**Post date:** [June 26, 2022, 9:31am UTC](https://sef.discourse.group/t/fixing-the-scholarx-repository-branches/405/5 "2022-06-26T09:31:58Z")

</div>

### Notice:

I renamed the `scholarx-feb-edition` branch of scholarx-frontend repo to `development`. From now onwards, it will be used for development and `master` branch will be used for the deployments.

The backend branches are also changed. From now onwards, `development` branch (previously `sx-february`) will be used for development. `master` branch will be used for releasing versions. `deployment` branch (previously `sx-feb-demo`) will be temporarily used for deployments.

You can use the following git example to update the branches locally.

```auto
 git branch -m sx-february development
 git fetch origin
 git branch -u origin/development development
 git remote set-head origin -a

```

---

<div class="post-metadata">

**Author:** ![anjisvj](https://yyz2.discourse-cdn.com/free1/user_avatar/sef.discourse.group/anjisvj/32/9_2.png) [@anjisvj](https://sef.discourse.group/u/anjisvj)\
**Post date:** [June 26, 2022, 2:16pm UTC](https://sef.discourse.group/t/fixing-the-scholarx-repository-branches/405/6 "2022-06-26T14:16:41Z")

</div>

Thank you @piumal1999 for getting this done! 🤩
