Archive:Development/Tutorials/Git/Pushing: Difference between revisions

From KDE TechBase
m (add todo list)
 
(Write bit about deciding between merge requests and direct pushes)
Line 1: Line 1:
(this page not written yet)
TODO:
TODO:
* Explain the differences between pushing and merge requesting
* Show how to do both pushing and merge requesting.
* Show how to do each.
 
==Getting an account on Gitorious==
Since nearly all of KDE's git repositories are hosted on gitorious, this is rather important. Fortunately, this part is relatively easy:
* Go to http://gitorious.org/ and follow the link to [http://gitorious.org/users/new register].
* Fill out the form.
 
==Deciding whether to push directly or make a merge request==
There are two basic ways to get code into KDE's project repositories: you can push it there yourself or make a merge request to have someone else do it for you. While that might make merge requests seem pointless, there are some reasons where you will want to use merge requests instead of direct pushes:
* Code review: Having your code looked at by another person (one who knows the project code better maybe) can be useful to keep easily preventable mistakes from entering the repository.
* First time commits: The first time you write code for a project, it is polite to use a merge request instead of pushing the code directly. This is a good way to make sure that you are on the same page as the other developers (and the maintainers) of the project which you are working on.
* Non-KDE developers: If you aren't a KDE deveoper (eg. you aren't in the kde-developers group on gitorious), and you want to get a quick fix included in a KDE program, a merge request is a simple way to get this done, since you do not have the ability to push directly. If you find yourself doing this frequently, you might want to consider "making it official" and applying to be a KDE Developer, it isn't that difficult to do.

Revision as of 05:56, 16 December 2009

TODO:

  • Show how to do both pushing and merge requesting.

Getting an account on Gitorious

Since nearly all of KDE's git repositories are hosted on gitorious, this is rather important. Fortunately, this part is relatively easy:

Deciding whether to push directly or make a merge request

There are two basic ways to get code into KDE's project repositories: you can push it there yourself or make a merge request to have someone else do it for you. While that might make merge requests seem pointless, there are some reasons where you will want to use merge requests instead of direct pushes:

  • Code review: Having your code looked at by another person (one who knows the project code better maybe) can be useful to keep easily preventable mistakes from entering the repository.
  • First time commits: The first time you write code for a project, it is polite to use a merge request instead of pushing the code directly. This is a good way to make sure that you are on the same page as the other developers (and the maintainers) of the project which you are working on.
  • Non-KDE developers: If you aren't a KDE deveoper (eg. you aren't in the kde-developers group on gitorious), and you want to get a quick fix included in a KDE program, a merge request is a simple way to get this done, since you do not have the ability to push directly. If you find yourself doing this frequently, you might want to consider "making it official" and applying to be a KDE Developer, it isn't that difficult to do.