← 返回首页
Document init script behavior with multiple master remotes by EliahKagan · Pull Request #2148 · gitpython-developers/GitPython · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .sh  (1) All 1 file type selected Viewed files
Conversations
Failed to load comments. Retry
Loading
Jump to
Jump to file
Failed to load files. Retry
Loading
Diff view
Unified
Split
Hide whitespace
Apply and reload
Show whitespace
Diff view
Unified
Split
Hide whitespace
Apply and reload
5 changes: 5 additions & 0 deletions init-tests-after-clone.sh
Show comments View file Edit file Delete file Open in desktop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ fi
git tag __testing_point__

# The tests need a branch called master.
#
# If master is locally absent but more than one remote has it, checkout fails
# by default even if all remotes agree, and we fall back to creating it at
# HEAD. The reflog we populate below then traces HEAD's history rather than
# a remote master's, but master is reset to __testing_point__ either way.
Comment thread
EliahKagan marked this conversation as resolved.
Show resolved Hide resolved
git checkout master -- || git checkout -b master

# The tests need a reflog history on the master branch.
Expand Down
Loading
Toggle all file notes Toggle all file annotations

Footer

© 2026 GitHub, Inc.