(→Getting the sources from git) |
m (moved Archive:Development/Tutorials/Git/GitQuickStart to Development/Tutorials/Git/GitQuickStart: revert) |
||
| (7 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
| − | |||
== Getting the sources from git == | == Getting the sources from git == | ||
* head over to https://projects.kde.org/projects . There you'll see a long list with all the projects hosted on KDE git. | * head over to https://projects.kde.org/projects . There you'll see a long list with all the projects hosted on KDE git. | ||
| Line 42: | Line 41: | ||
User git | User git | ||
IdentityFile ~/.ssh/id_rsa.kde | IdentityFile ~/.ssh/id_rsa.kde | ||
| + | |||
| + | |||
| + | |||
| + | === Commit changes === | ||
| + | |||
| + | * set your git identity | ||
| + | $ git config --global user.email "you@example.com" | ||
| + | $ git config --global user.name "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 | ||
Contents |
$ git clone git://anongit.kde.org/attica
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
In the following we go through this step by step
Above, we got the sources from anongit.kde.org. These are mirrors of git.kde.org and should for performance reasons be used for obtaining the sources. But for committing git.kde.org has to be used.
This is done by putting the following into ~/.gitconfig:
[url "git@git.kde.org:"]
pushInsteadOf = git://anongit.kde.org/
Host git.kde.org User git IdentityFile ~/.ssh/id_rsa.kde
$ git config --global user.email "you@example.com" $ git config --global user.name "Your Name"
$ git add <filename(s)>
$ git commit -m "commit message"
$ git push