Documentation

Using GitHub

We use GitHub for a lot of things, GitHub is the place where we store our repositories for FluxBB v1.x, FluxBB v2.x, FluxBB.org, modifications, language packs and so on. So, it's nice to know how to work whit GitHub.

Create a new repository

When you make a commit in Git, it will store it in a repository (a.k.a. “repo”). Before you can store a commit in a repo, you need to create one.

Click New Repository

After that, you can simply fill in the information on this page. If you think you're ready, click “Create Repository'. If everything is alright, you have created your new repository.

Create a README

A README isn't a required file in a GitHub repo, through it's a good idea to have one. READMEs are a awesome place to describe the project that's in the repo. For example, you can include contact information in it.

Step 1: Create the README file

In the prompt, type the following code:

$ mkdir ~/MyRepo
# Creates a directory for your project called "MyRepo" in your user directory

$ cd ~/MyRepo
# Changes the current working directory to your newly created directory

$ git init
# Sets up the necessary Git files
Initialized empty Git repository in /Users/you/MyRepo/.git/

$ touch README
# Creates a file called "README" in your Hello-World directory

Open the ew README file that you can find in your MyRepo directory in a tekst editor and add the thext you want there. When you are finished, save and close the file.

Step 2: Commit your README Now you have created you README, it's time to commit it.

$ git add README
# Stages your README file, adding it to the list of files to be committed

$ git commit -m 'first commit'
# Commits your files, adding the message "first commit"

Step 3: Push your commit So far everything you've done has been in your local repository, meaning you still haven't done anything on GitHub yet. To connect your local repository to your GitHub account, you will need to set a remote for your repo and push your commits to it:

$ git remote add origin https://github.com/username/MyRepo.git
# Creates a remote named "origin" pointing at your GitHub repo

$ git push origin master
# Sends your commits in the "master" branch to GitHub

If you now take a look in your repo on GitHub you will se that there is a new file called README in the MyRepo repository.

Fork a repo

Contributing to FluxBB

At some point in time, you maybe think this: “Well, it's time to help those nasty FluxBB Developers in making their software!” Except for the 'nasty'-part, that's great! The only problem is: how to begin? Well, we call it 'forking'. For this part, we will use the curent FluxBB-version 1.5.

Step 1: Fork the 'FluxBB' repository

First of all, go the the project page and click on 'Fork'.

Step 2: Clone your fork

If the forking is done, you are able to clone the FluxBB repository. Right now, it's only on your GitHub, but over there, you are unable to edit the files. That's why we will clone it to our PC.

Run the following code:

$ git clone https://github.com/username/fluxbb.git
# Clones your fork of the repository into the current directory in terminal

Step 3: Configure remotes

Now that you have cloned the 'fluxbb'-repository, there is an default remote called origin that points to the fork on your own GitHub account. It would be nice if we are able to create a remote that points to the Original repository to. That's why we are now going to make a remote called upstream:

$ cd fluxbb
# Changes the active directory in the prompt to the newly cloned "fluxbb" directory
$ git remote add upstream https://github.com/fluxbb/fluxbb.git
# Assigns the original repository to a remote called "upstream"
$ git fetch upstream
# Pulls in changes not present in your local repository, without modifying your files