< Development‎ | Tutorials
Revision as of 03:59, 8 June 2011 by Glenkaukola (Talk | contribs) (Pushing changes)

Jump to: navigation, search

Getting the sources from git

  • head over to . There you'll see a long list with all the projects hosted on KDE git.
  • find the project you are interested in, and click the link, e.g. to Attica
  • on the Attica project page, go to the repository page. There you will find the clone command.
  • Execute this clone command and you'll get a copy of the sources:
   $ git clone git://

Pushing your changes

If you followed the steps above, you now have a clone of the git repository.

In order to be able to commit your changes, you need

  • tell git to push to, instead of
  • to setup a ssh key for authentication
  • tell ssh to use that key for

In the following we go through this step by step

Telling git to push to

Above, we got the sources from These are mirrors of and should for performance reasons be used for obtaining the sources. But for committing has to be used.

This is done by putting the following into ~/.gitconfig:

 [url ""]
     pushInsteadOf = git://

Setting up ssh keys for authentication

  • create a set of keys to use using ssh-keygen, and name the key e.g. id_rsa.kde.
  • log in to
  • go to "Profile" -> "Edit" -> "Edit public ssh keys"
  • upload the public key you just created

Tell ssh to use this key

  • put the following in your ~/.ssh/config :
   User git
   IdentityFile ~/.ssh/id_rsa.kde

Pushing changes

  • set your git identity
  $ git config --global ""
  $ git config --global "Your Name"
  • add the changed file(s):
  $ git add <filename(s)>
  • run git commit:
  $ git commit -m "commit message"
  • now you should be able to push your changes to the central git repository:
  $ git push

Content is available under Creative Commons License SA 4.0 unless otherwise noted.