Infrastructure/Git/Simple Workflow: Difference between revisions

From KDE Community Wiki
(Created page with '== Simple KDE Git Workflow == This Git Workflow is designed to be followed by a new Git user who needs a simple workflow for bug fixes and new features in a manner similar to th...')
 
No edit summary
Line 9: Line 9:
== Set-up ==
== Set-up ==


This section documents how to set you Git and you repository for development.
This section documents how to set up Git and your code repository for development.


=== Configure Git ===
=== Configure Git ===


Follow the [[Infrastructure/Git/Configuration|KDE Git Configuration]].
Follow the [[Infrastructure/Git/Configuration|KDE Git Configuration]] page.


=== Clone your repository ===
=== Clone your repository ===


You need to clone your repository
You need to copy your repository from git.kde.org into your local KDE source directory.  In Git this process is called cloning.
 
To clone your project repository:
 
cd your/source/dir
git clone kde:<project>
 
In our KFoo example:
 
git clone kde:kfoo
 
See the [[Getting_Started/Build/Environment|KDE Build Environment]] page for advice on structuring your source directory.
 
If you have a slow internet connection then you may prefer to [[Getting_Started/Sources/Snapshots|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:
 
wget -c http://anongit.kde.org/<project>/<project>-latest.tar.gz


== Basic Actions ==
== Basic Actions ==

Revision as of 12:18, 5 June 2011

Simple KDE Git Workflow

This Git Workflow is designed to be followed by a new Git user who needs a simple workflow for bug fixes and new features in a manner similar to the old SVN workflow.

Note that each module may choose to adopt a more complex workflow and you should check with your modules maintainers if this is the case.

The worked examples given will be for an imaginary app called KFoo in a git.kde.org repository called 'kfoo'.

Set-up

This section documents how to set up Git and your code repository for development.

Configure Git

Follow the KDE Git Configuration page.

Clone your repository

You need to copy your repository from git.kde.org into your local KDE source directory. In Git this process is called cloning.

To clone your project repository:

cd your/source/dir
git clone kde:<project>

In our KFoo example:

git clone kde:kfoo

See the KDE Build Environment page for advice on structuring your source directory.

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:

wget -c http://anongit.kde.org/<project>/<project>-latest.tar.gz

Basic Actions

This section documents basic actions that are performed within your workflow.

See also the KDE Git Recipes page.

Create a Work Branch

Commit Your Changes

Push Your Changes

Local Bug Fixing

This example workflow is for locally fixing bugs in 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.