Changes between Version 46 and Version 47 of WorkingWithGit
- Timestamp:
- Aug 26, 2016, 6:17:04 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WorkingWithGit
v46 v47 21 21 Additionally one should define a few (very likely not necessarily global) presets for working with your clone of the MacPorts repository: 22 22 {{{ 23 git config --global branch.autosetuprebase always24 23 git config --global core.excludesfile ~/.gitignore_global 25 24 git config --global commit.template ~/.git-commit-template 26 25 }}} 27 which makes sure that your current changes get always auto-rebased ontop of the pulled changes from {{{origin}}} andadds an excludes file as well as a commit template.26 which adds an excludes file as well as a commit template. 28 27 29 28 '''T.B.D.:''' A MacPorts'ish ignore file {{{.gitignore_global}}} should be supplied here, perhaps based on [https://quickgit.kde.org/?p=macports-kde.git&a=blob&h=bb618b30d4daba183823b797fa56ae65b207c569&hb=120899f859eefbe0bf669685352e7c44a834e23f&f=contrib%2Fgit-setup%2F.gitignore_global this]?!! … … 190 189 '''Warning:''' `git pull` without the `--rebase` flag is a shorthand for `git fetch && git merge origin/master`, which will automatically create a merge commit if it thinks that's necessary. 191 190 191 If you do not want to remember passing `--rebase` to `git pull` every time you run it, you can set a couple of `git-config(1)` options to make it the default: 192 193 - Setting `pull.rebase` to `true` will change the default to always rebase when calling `git pull`. Note that this will also flatten any local merge commits you might have committed on purpose with `git merge`, which might be undesirable when merging development branches for MacPorts base. Consider using the `preserve` setting, which avoids this. 194 - Rebasing can be enabled on a per-branch basis using the `branch.<name>.rebase` setting, which accepts the same values as `pull.rebase`. 195 - You can make `branch.<name>.rebase true` the default for all branches that you clone by setting `branch.autoSetupRebase` to `always`. This allows you to change the setting back to a different value for specific branches but still keep the default to rebase. Note that this setting will not affect branches that you have already created. 192 196 193 197 === Commit messages === #commitmessages