[MacPorts] WorkingWithGit modified

MacPorts noreply at macports.org
Sat Aug 20 23:55:25 PDT 2016

Page "WorkingWithGit" was changed by mk at macports.org
Diff URL: <https://trac.macports.org/wiki/WorkingWithGit?action=diff&version=20>
Revision 20
Comment: Add basic setup info based on KDE's configuration hints
Index: WorkingWithGit
--- WorkingWithGit (version: 19)
+++ WorkingWithGit (version: 20)
@@ -4,9 +4,44 @@
+== Initial setup ==
+Start with some basic setup (based on [https://community.kde.org/Infrastructure/Git/Configuration KDE's configuration hints]):
+$ git config --global user.name "Your Name"
+$ git config --global user.email YOUR_MACPORTS_HANDLE at macports.org
+#                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+#                         if not registered with a MacPorts handle
+#                                 simply use another email address
+Additionally one should define a few (not necessarily global) presets for working with your clone of the MacPorts repository:
+$ git config --global push.default nothing
+$ git config --global branch.autosetuprebase always
+$ git config --global core.excludesfile ~/.gitignore_global
+$ git config --global commit.template ~/.git-commit-template
+$ git config --global color.ui true
+which avoids that you accidentally push changes into a wrong branch at {{{origin}}}, makes sure that your current changes get always auto-rebased ontop of the pulled changes from {{{origin}}}, adds an excludes file as well as a commit template and enables colorizing {{{git}}}'s console output.
+'''T.B.D.:''' A MacPorts'ish ignore file {{{.gitignore_global}}} should be supplied here, perhaps based on [http://quickgit.kde.org/?p=macports-kde.git&a=blob&h=14f952f776b9f54263671cc2aba5886c6ebee75b&hb=120899f859eefbe0bf669685352e7c44a834e23f&f=contrib%2Fgit-setup%2F.git-commit-template this]?!!
+'''T.B.D.:''' A git commit template file {{{.git-commit-template}}} should be supplied here, perhaps based on [https://quickgit.kde.org/?p=macports-kde.git&a=blob&h=14f952f776b9f54263671cc2aba5886c6ebee75b&hb=120899f859eefbe0bf669685352e7c44a834e23f&f=contrib%2Fgit-setup%2F.git-commit-template this]?!!
+'''T.B.D.:''' To make life easier when working with a couple of remotes one should define also some URL renaming for the MacPorts repo as it gets done e.g. for KDE like this:
+[url "git://anongit.kde.org/"]
+	insteadOf = kde:
+[url "git at git.kde.org:"]
+	pushInsteadOf = kde:
+which needs an update once it's clear which URL the MacPorts `git` repo is going to have.
 == Common `git` tasks while working with ports ==
-To start:
 svn checkout https://svn.macports.org/repository/macports/trunk/dports

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

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 .

More information about the macports-changes mailing list