Changes between Version 46 and Version 47 of WorkingWithGit


Ignore:
Timestamp:
Aug 26, 2016, 6:17:04 PM (8 years ago)
Author:
neverpanic (Clemens Lang)
Comment:

Move branch.autoSetupRebase to the pulling section

Legend:

Unmodified
Added
Removed
Modified
  • WorkingWithGit

    v46 v47  
    2121Additionally one should define a few (very likely not necessarily global) presets for working with your clone of the MacPorts repository:
    2222{{{
    23 git config --global branch.autosetuprebase always
    2423git config --global core.excludesfile ~/.gitignore_global
    2524git config --global commit.template ~/.git-commit-template
    2625}}}
    27 which makes sure that your current changes get always auto-rebased ontop of the pulled changes from {{{origin}}} and adds an excludes file as well as a commit template.
     26which adds an excludes file as well as a commit template.
    2827
    2928'''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]?!!
     
    190189'''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.
    191190
     191If 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.
    192196
    193197=== Commit messages === #commitmessages