Commit c60bb48
merge: new autosetupmerge option 'simple' for matching branches
This commit introduces a new option to the branch.autosetupmerge
setting, "simple", which is intended to be consistent with and
complementary to the push.default "simple" option.
The push.defaut option "simple" helps produce
predictable/understandable behavior for beginners, where they don't
accidentally push to the "wrong" branch in centralized workflows. If
they create a local branch with a different name and then try to do a
plain push, it will helpfully fail and explain why.
However, such users can often find themselves confused by the behavior
of git after they first branch, and before they push. At that stage,
their upstream tracking branch is the original remote branch, and pull
will be bringing in "upstream changes" - eg all changes to "main", in
a typical project where that's where they branched from.
On the other hand, once they push their new branch (dealing with the
initial error, following instructions to push to the right name),
subsequent "pull" calls will behave as expected, only bring in any
changes to that new branch they pushed.
The new option introduced here, with push.default set to simple,
ensures that push/pull behavior is generally consistent - tracking
will be automatically set up for branches that push will work for
(and pull will be consistent for) only.
Signed-off-by: Tao Klerks <tao@klerks.biz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent dab1b79 commit c60bb48
File tree
5 files changed
+37
-8
lines changed- Documentation
- config
5 files changed
+37
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
231 | 235 | | |
232 | 236 | | |
233 | 237 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
255 | 260 | | |
256 | 261 | | |
257 | 262 | | |
258 | 263 | | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
259 | 278 | | |
260 | 279 | | |
261 | 280 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1673 | 1673 | | |
1674 | 1674 | | |
1675 | 1675 | | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
1676 | 1679 | | |
1677 | 1680 | | |
1678 | 1681 | | |
| |||
0 commit comments