GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Document init script behavior when multiple remotes have master · gitpython-developers/GitPython@7a03e10

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • init-tests-after-clone.sh
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎init-tests-after-clone.sh‎

Copy file name to clipboardExpand all lines: init-tests-after-clone.sh
+6-1Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,12 @@ fi
3939
# This also keeps track of where we are, so we can get back here.
4040
git tag __testing_point__
4141

42-
# The tests need a branch called master.
42+
# The tests need a branch called master. If master is locally absent but more
43+
# than one remote has it, "git checkout master --" fails (even if all those
44+
# remote-tracking branches point to the same commit), and we fall back to
45+
# creating master at HEAD. The reflog from the resets below then traces HEAD's
46+
# history rather than a remote master's, but master is reset to
47+
# __testing_point__ either way.
4348
git checkout master -- || git checkout -b master
4449

4550
# The tests need a reflog history on the master branch.

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.