wiki:control-panel/common-tasks

Control Panel: Common tasks UI Improvements

Setting up your local git environment

To get started you simply need to clone the red repo and install red.

To clone red try: git clone gitosis@git.mayfirst.org:mfpl/red

Read the installation instructions here

Using git

If you're just editing a few lines of code and suspect it will only take you a single commit to work your magic, just make the commit to the dev branch. Be sure to leave a good commit comment, preferably with the ticket number you're fixing (ex: git commit -m "added reset password dialog fix #8175")

If your edits might require more than one commit create a new branch git checkout -b ticket_0000 (this command will create a new branch then switch to it). Remember, you can make a new branch any time while editing the code!

It is suggested that you name the branch after the ticket number you are working on (e.g. git branch ticket_1234).

If you aren't working on a ticket then prefix your branch name with your initials. (e.g. dh_new_branch)

Understanding red dev git branches

We use the master branch for stable tested code.

The dev branch is for development code, you should merge your working branch into dev on your local machine then push it to the git repo so that you only have to pull down the dev branch on the server.

Pushing changes to Red development environment

Note: If you have a MayFirst account and would like access to the dev hosting order please issue a ticket to https://id.mayfirst.org/drew and ask politely.

The red development environment lives at https://red.dev.mayfirst.org/ on rose.mayfirst.org.

This environment pulls from the red git repo at git://git.mayfirst.org/mfpl/red

To pull updates simply log in to the red.dev.mayfirst.org hosting order using ssh red.dev@rose.mayfirst.org

Then use the following commands:

cd red.dev.mayfirst.org/web/
git checkout dev #this will ensure that you're on the dev branch
git pull
git merge origin/dev

If all goes well you should see the changes on https://red.dev.mayfirst.org/. Remember to do a "hard refresh" using ctrl+shift+R (command+shift+R for mac) on most browsers. This will ensure that you overwrite any supplementary files (like css) in your browsers cache.

Once your changes are live on dev be sure to have people review the changes. If they appear to be stable then we can take them live. See instructions below.

Testing unstable changes

If you have some crazy experimental changes you want to test please set the dev environment to a different branch. Here's an example:

On the red.dev.mayfirst.org server:

cd ~/red.dev.mayfirst.org/web/
git pull origin your_branch_name
git checkout your_branch_name

Then you'll be able to view your experimental changes on https://red.dev.mayfirst.org/.

When you're done testing please set the git back to the dev branch using the command git checkout dev.

When your code is ready for prime time

Once you've thoroughly tested and shared your changes from the dev branch and everyone is happy with the great work you've done feel free to merge your changes into the master branch and push those changes to the red dev repo. This process should look something like this:

git checkout master
git merge dev
git push origin master
Last modified 6 years ago Last modified on Jan 11, 2014, 1:55:56 PM