Skip to content

Commit

Permalink
Configure git pull rebase
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
xorcare committed Sep 29, 2024
1 parent 104e508 commit 39007ae
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions home/.gitconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 39007ae

Please sign in to comment.