Local repository setup and maintenance
This section describes the initial setup and routine maintenance of your local repository
Download source code
Clone the repository
git clone https://gitlab.com/veloren/veloren.git
See Troubleshooting if you cloned the repo before Git LFS was setup
Change your working directory to the cloned repository
All commands in this chapter from now on should be executed from there.
Basic repo navigation
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
The help command
Git also offers a help command with detailed information about other commands
git help <optional subcommand name>
Modifying the source code
If you want to modify the source code, refer to contributing chapter.
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
This section covers common operations used to keep your local copy working properly.
Cleaning old build files
Over time as dependencies get updated, the old compiled versions start to take up a lot of space. To delete them type
Keep in mind that cargo will need to recompile all dependencies which can take a long time.
Updating the toolchain
To update the rust toolchain