From 39007aef7c65bceb5424165844deccbd24359d5b Mon Sep 17 00:00:00 2001 From: Vasiliy Vasilyuk Date: Sun, 29 Sep 2024 17:53:12 +0300 Subject: [PATCH] Configure git pull rebase Setting git config --global pull.rebase true configures Git to use rebasing as the default method for integrating changes when executing the git pull command. This means that instead of merging the fetched changes with your local branch (which can create additional merge commits), Git will reapply your local changes on top of the incoming changes from the remote branch. Key Features - **Cleaner History**: By using rebasing, you maintain a linear project history, which simplifies navigation and understanding of the commit history. This avoids clutter from unnecessary merge commits. - **Default Behavior**: With this configuration, you no longer need to specify the `--rebase` option every time you pull. It applies globally across all repositories on your machine. - **Conflict Handling**: While rebasing can lead to conflicts, it allows for a more straightforward resolution process since each commit is applied one at a time. If conflicts arise, you can resolve them and continue the rebase. --- home/.gitconfig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/home/.gitconfig b/home/.gitconfig index 4f2434b..7763327 100644 --- a/home/.gitconfig +++ b/home/.gitconfig @@ -223,6 +223,11 @@ default = simple # git config --global push.autoSetupRemote true autoSetupRemote = true +[pull] + +# git config --global pull.rebase true +rebase = true + [submodule] # git config --global submodule.recurse false