[MacPorts] WorkingWithGit modified

MacPorts noreply at macports.org
Sun Nov 6 04:31:19 CET 2016


Page "WorkingWithGit" was changed by larryv
Diff URL: <https://trac.macports.org/wiki/WorkingWithGit?action=diff&version=69>
Revision 69
Comment: remove "Commit messages" section, which was incorporated into the CommitMessages rewrite
Changes:
-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: WorkingWithGit
=========================================================================
--- WorkingWithGit (version: 68)
+++ WorkingWithGit (version: 69)
@@ -57,7 +57,7 @@
 {{{
 git commit
 }}}
-which prompts you for the commit message. See the [#commitmessages section on commit messages in git] for more information on git conventions and expectations in commit messages.
+which prompts you for the commit message. See CommitMessages for more information on git conventions and expectations in commit messages.
 
 Because of Git's distributed nature, a commit on your local machine is not immediately available on the central server, like it was with Subversion. This means that you can continue to prepare further changes in additional commits before you publish your changes as a set. In fact, it is a very common practice in Git to do many small changes that are logically consistent in themselves and then publish them in one step.
 
@@ -67,37 +67,6 @@
 }}}
 
 Note that the push will fail if the remote repository has new changes. Contrary to Subversion, it does not matter whether your changes conflict with the remote ones. If this happens, you must update your local working copy as described in the [#updating section on fetch the latest changes] and re-try the push.
-
-
-=== Commit messages === #commitmessages
-
-{{{
-#!div style="background-color: lightyellow; padding: 0.25em;"
-TODO: This section needs to be merged with CommitRules
-}}}
-
-To set which text editor is used by git for writing commit messages, you can do either of:
- * Set {{{core.editor}}} in your Git config: {{{git config --global core.editor "emacs"}}}
- * Set the {{{GIT_EDITOR}}} environment variable: {{{export GIT_EDITOR=emacs}}}
-
-There are a number of conventions to writing Git commit messages. For a detailed explanation, see http://chris.beams.io/posts/git-commit/. As a tl;dr, here are seven short rules:
-
- 1. Separate subject from body with a blank line
- 1. Limit the subject line to 50 characters
- 1. Capitalize the subject line
- 1. Do not end the subject line with a period
- 1. Use the imperative mood in the subject line
- 1. Wrap the body at 72 characters
- 1. Use the body to explain what and why vs. how
-
-Additionally, MacPorts has the following rules for references to tickets, pull requests and commits:
-
- * When referencing a ticket, use the full URL to  Trac: !https://trac.macports.org/ticket/<number>
- * When referencing a pull request, use !#12345
- * When referencing a commit, use a git commit hash: !bfc6af313273c79515df9bde4f3eaa2dd0f15276, which may be abbreviated to up to 7 characters: !bfc6af3
-
-If you don't want to remember these rules, you can configure your git client to load a template whenever it prompts you for a commit message by setting the `commit.template` [https://git-scm.com/docs/git-config git-config(1)] option. The KDE developers [https://quickgit.kde.org/?p=macports-kde.git&a=blob&h=14f952f776b9f54263671cc2aba5886c6ebee75b&f=contrib%2Fgit-setup%2F.git-commit-template&o=plain have a nice example].
-
 
 === Fetching the latest changes === #updating
 Git's equivalent to `svn update` is a little more complicated due to Git's distributed nature. Most of the complexity is not visible if you do not have commits in your working copy that have not been pushed yet. If both the local and the remote repository have changes (git calls them "diverged"), you will run into one of Git's core principles: Every commit has (at least) one parent commit, i.e. the commit history forms a directed acyclic graph.
-------8<------8<------8<------8<------8<------8<------8<------8<--------

--
Page URL: <https://trac.macports.org/wiki/WorkingWithGit>
MacPorts <https://www.macports.org/>
Ports system for macOS

This is an automated message. Someone added your email address to be
notified of changes on 'WorkingWithGit' page.
If it was not you, please report to admin at macports.org.


More information about the macports-changes mailing list