If you have a slow internet connection then you may prefer to download a snapshot tarball to bootstrap your clone. You can copy the required command from the projects.kde.org Repository page for your project, but it will be of the form:

Basic Actions

Create a Work Branch

By default when you first create a repository clone there is only a single local branch called 'master'. It is not good practice to do development in master, it is better kept clean for reference. Instead all work should be performed in a new local branch, even bug fixes.

To see what local branches you have:

git branch

To see all local and remote branches:

git branch -a

To create a new local branch:

git branch <new-branch>
git checkout <new-branch>

This will create a new branch based on whatever local branch you were already in, i.e. that includes all the history of the original branch, which can be useful in building a hierarchy of dependent changes.

You may prefer to base your new branch on a remote branch such as the master branch of the central repository so you can integrate any new development. This is called 'tracking' and is recommended for most branches:

git branch --track <local-branch> <remote-branch>

For our KFoo example:

git branch --track new-bar-feature origin/master

Commit Your Changes

Push Your Changes

Local Bug Fixing

This example workflow is for locally fixing bugs in both the stable and unstable branches and pushing them to the central repository.

This workflow is only recommended for small fixes or where you are the only developer on a project.

Local Feature Development

This example workflow is for locally working on new features in unstable branch and pushing them to the central repository.

This workflow is only recommended for small features or where you are the only developer on a project.

Remote Feature Development

This example workflow is for working on new features in a feature branch hosted on the central repository.

This workflow is recommended for larger features or where there are many developers on a project.