This section describes the initial setup and maintenance of your local repository.
Note: To understand the following we highly recommend reading about git!
Clone the repository
git clone https://gitlab.com/veloren/veloren.git
Change your working directory to the cloned repository
Note: All commands in this chapter from now on should be executed from there.
In order to try out new unmerged or unfinished features, you may want to switch to a different branch.
To switch to a developement branch
git checkout <branch_name>
To switch back to master
git checkout master
To download the latest changes and update your current branch
To download the latest changes without merging them into your local branch
Git also offers a help command with detailed information about other commands
git help <optional subcommand name>
If you want to modify the source code, refer to the developer section.
To discard changes you've made to the source code
git reset --hard
Keep in mind that this deletes all the changes without a way to recover them.
To discard your changes with ability to restore them later
To restore stashed changes
git stash pop
Over time as dependencies get updated, the old compiled versions start to take up a lot of space. To delete them type
NOTE: Keep in mind that cargo will need to recompile all dependencies which can take a long time.
We use a
rust-toolchain file in the repository which will automatically update
your rust toolchain to whichever version we use. There shouldn't be any additional effort needed on your side.