Xfce Wiki

Sub domains
 

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
contribute:dev:git:start [2020/06/19 13:12] – [GitLab Forks and Merge Requests] skunnykcontribute:dev:git:start [2024/04/14 10:35] (current) – [GitLab Forks and Merge Requests] gael
Line 1: Line 1:
 +~~NOTOC~~
 ====== Using Git within the Xfce development workflow ====== ====== Using Git within the Xfce development workflow ======
  
   * **[[start#Introduction|Introduction]]**   * **[[start#Introduction|Introduction]]**
   * **[[start#Setting your Git credentials|Setting your Git credentials]]**   * **[[start#Setting your Git credentials|Setting your Git credentials]]**
-  * **[[start#Git usage example on an Xfce project|Git usage example on an Xfce project]]**+  * **[[start#Git usage example on an Xfce project|Git usage example on an Xfce project]]**  
 +  * **[[start#Commit Guidelines|Commit Guidelines]]**
   * **[[start#GitLab Forks and Merge Requests|GitLab Forks and Merge Requests]]**   * **[[start#GitLab Forks and Merge Requests|GitLab Forks and Merge Requests]]**
   * **[[start#Git rules on gitlab.xfce.org|Git rules on gitlab.xfce.org]]**   * **[[start#Git rules on gitlab.xfce.org|Git rules on gitlab.xfce.org]]**
   * **[[start#Git repository description|Git repository description]]**   * **[[start#Git repository description|Git repository description]]**
   * **[[:contribute/dev/git/github|Xfce GitHub mirror]]**   * **[[:contribute/dev/git/github|Xfce GitHub mirror]]**
 +
 +----
  
 ===== Introduction ===== ===== Introduction =====
  
 Xfce uses Git as distributed version control system (DCVS) for all the code contributed by developers. On this page, we will explain the basics and initial setup needed to get started developing for Xfce. However, if you want to know it all about Git, look at the following websites for a more in depth examination of Git and its usage: Xfce uses Git as distributed version control system (DCVS) for all the code contributed by developers. On this page, we will explain the basics and initial setup needed to get started developing for Xfce. However, if you want to know it all about Git, look at the following websites for a more in depth examination of Git and its usage:
 +
 +----
  
 === Git resources === === Git resources ===
Line 26: Line 32:
  
   * **[[github|GitHub mirror]]** -- What we do with the GitHub mirror of the Xfce repositories.   * **[[github|GitHub mirror]]** -- What we do with the GitHub mirror of the Xfce repositories.
 +
 +----
  
 ===== Setting your Git credentials ===== ===== Setting your Git credentials =====
Line 40: Line 48:
 [[|Back To Top]] [[|Back To Top]]
 ---- ----
 +
 ===== Git usage example on an Xfce project ===== ===== Git usage example on an Xfce project =====
  
Line 69: Line 78:
   * Write commit messages using the standard Git message format.   * Write commit messages using the standard Git message format.
   * Don't fear the rebase (against the Xfce master branch): you should fix the merge problems, not the developer.   * Don't fear the rebase (against the Xfce master branch): you should fix the merge problems, not the developer.
 +  * Read the guidelines below
  
 [[|Back To Top]] [[|Back To Top]]
Line 74: Line 84:
  
 ---- ----
 +
 +===== Commit Guidelines =====
 +
 +  * The commit message is made of summary (first line), one empty line and the remaining lines are its description.
 +  * Keep the summary short, aim for up to 72 characters.
 +  * You're encouraged to write an extensive description when it makes sense, [[https://gitlab.xfce.org/xfce/xfwm4/-/commit/49c1a33a4dfe15f312334584c22b4ec3ed792214|example]]
 +  * Add reference to the related issue or merge request at the end of summary.
 +    * Reference for an issue: "Shorten strings in Arrange Items submenu (#247)"
 +    * Reference for a merge request: "Add new app icon (!11)"
 +    * When a commit relates to an issue and a merge request, only add the former to the summary and mention the latter in the description.
 +  * Optionally Sign Off your commits (mandatory for Xfwm4!).
 +  * GitLab's [[https://docs.gitlab.com/ce/user/project/issues/managing_issues.html#default-closing-pattern|closing patterns]] such as ''fixes'' and ''closes'' should go into the commit description, never in the summary.
 +  * When making isolated changes, such as in a single part of the project or one of its plugins, please add a lowercase label as the summary prefix, examples:
 +    * "mime-helpers: Rename Thunar to thunar"
 +    * "action buttons: Fix separator width"
 +    * "tasklist: Allow keyboard navigation within groups (#270)"
 +
 +[[|Back To Top]]
 +
 +
 +----
 +
 ===== GitLab Forks and Merge Requests ===== ===== GitLab Forks and Merge Requests =====
  
-If you want to contribute code the best way is to get a contributor's account and fork the project you would like the contribute to and file a [[https://docs.gitlab.com/ee/user/project/merge_requests/|merge request]]. +If you want to contribute codethe best way is to get a contributor's account and fork the project you would like to contribute to and file a [[https://gitlab.xfce.org/help/user/project/merge_requests/index.md|merge request]]. 
-  - Fork the project +  - Ask for fork permissions [[/contribute/start#communication|on the mailing list or in our Matrix channel]] 
-  - Clone your fork +  - Fork the project via the GitLab UI 
-  - Create a new branch (try to use a descriptive name), don't use "master"+  - Clone your fork locally 
 +  - **Create a new branch** (try to use a descriptive name), don't use "master" (otherwise we cannot rebase and merge your branch)
   - Change and push your code to your fork/branch   - Change and push your code to your fork/branch
   - Start a merge request and [[https://docs.gitlab.com/ee/user/project/merge_requests/allow_collaboration.html|allow maintainers to change your branch]] (this means maintainers can rebase your branch on top of master using the GitLab Web UI)   - Start a merge request and [[https://docs.gitlab.com/ee/user/project/merge_requests/allow_collaboration.html|allow maintainers to change your branch]] (this means maintainers can rebase your branch on top of master using the GitLab Web UI)
Line 88: Line 121:
  
 ---- ----
 +
 ===== Git rules on gitlab.xfce.org ===== ===== Git rules on gitlab.xfce.org =====
  
Line 98: Line 132:
 [[|Back To Top]] [[|Back To Top]]
 ---- ----
 +
 ===== Git repository description ===== ===== Git repository description =====
  
Line 104: Line 139:
 [[|Back To Top]] [[|Back To Top]]
 ---- ----
 +[[:contribute:dev:start:|Back to main Xfce Development Information page]]