Approvals: 0/1
This is an old revision of the document!
Contributing to Batocera.linux
This page is, currently, far from being perfect, we recommend anyone who wishes to contribute to batocera to join the Discord server if there is any question or error here.
Basics
Batocera is an open-source software, it's source code can be found at https://github.com/batocera-linux/batocera.linux, in order to contribute to the code, you can make a Pull Request with the changes you made to the OS.
Making a first Pull-Request
There are multiple steps to make a pull request, the first one is to fork batocera, then to clone that fork locally, to make the changes locally, test them, and once it is done, to create a local branch on your fork, push your changes to it, then ask for a pull request containing those changes.
We will need to use git
for this.
The first time, you will need to fork the system and clone it locally. The next time, you will simply need to make your local copy up to date with the upstream branch.
Forking Batocera.linux
To make a Pull Request, you first need to make a fork of batocera.linux :
- Login to your github account
- Click on the Fork button on the right
This will create a fork at https://github.com/YOURNAME/batocera.linux
where YOURNAME
is your github username.
Cloning your fork locally
You have to clone this fork locally, the easiest way is to open a command line and type git clone https://github.com/YOURNAME/batocera.linux
where YOURNAME
is your github username.
You then need to go into the created folder (which should be batocera.linux
), once inside, you will need to tell it this is a fork of https://github.com/batocera-linux/batocera.linux using the following commands :
git remote add upstream https://github.com/batocera-linux/batocera.linux.git
git remote set-url upstream https://github.com/batocera-linux/batocera.linux.git
Finally, you have to tell it the URL of your own fork itself using :
git remote set-url origin https://github.com/YOURNAME/batocera.linux
whereYOURNAME
is your github username.
Making and testing the modifications
You have some guidelines on this page to compile individual packages or this page for more general compilation of the whole Batocera Linux system.
Make a local branch and commit your changes to it
You then need to make a local branch using git checkout -b Name-of-the-branch
, once this is done, you have to commit your changes to it using git commit
.
Pushing your changes to your fork
Once all of this is done, you have to send them to your fork using the git push --set-upstream origin Name-of-the-branch
Making the pull request
You can now go into your github fork link, and click on Pull Request
, this will let you ask to merge the changes into the main repository.
Make new changes
Once you have made this at least once, you can simply make your own master branch up to date with the upstream master branch. to do this, you need to do:
git checkout master
: Tells git to use the master branchgit fetch upstream
: Tells git to grab every changes from the upstream repositorygit rebase upstream/master
: Tells git to make your branch up to date with the master branch of the upstream repository
You then make your changes, create a new branch using git checkout -b Name-of-the-branch
and commit your changes to it like before, the rest doesn't change from the first time.
- contributing-to-batocera.1616749041.txt.gz
- Last modified: 3 years ago
- by fishou