Skip to content

Commit 3c31eac

Browse files
committed
branch.autosetuprebase
1 parent 7078656 commit 3c31eac

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
* [Undo assume-unchanged.](https://github.com/git-tips/tips#undo-assume-unchanged)
7474
* [Clean the files from `.gitignore`.](https://github.com/git-tips/tips#clean-the-files-from-gitignore)
7575
* [Restore deleted file.](https://github.com/git-tips/tips#restore-deleted-file)
76+
* [Always rebase instead of merge on pull.](https://github.com/git-tips/tips#always-rebase-instead-of-merge-on-pull)
7677

7778
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
7879
<!-- @doxie.inject end toc -->
@@ -509,5 +510,10 @@ git clean -X -f
509510
git checkout <deleting_commit>^ -- <file_path>
510511
```
511512

513+
## Always rebase instead of merge on pull.
514+
```sh
515+
git config --global branch.autosetuprebase always
516+
```
517+
512518
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
513519
<!-- @doxie.inject end -->

tips.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,5 +292,9 @@
292292
{
293293
"title": "Restore deleted file.",
294294
"tip": "git checkout <deleting_commit>^ -- <file_path>"
295+
},
296+
{
297+
"title": "Always rebase instead of merge on pull.",
298+
"tip": "git config --global branch.autosetuprebase always"
295299
}
296300
]

0 commit comments

Comments
 (0)