René's URL Explorer Experiment


Title: Fix #3755: avoid creating orphan branch when push_files fails by genius-0963 · Pull Request #3778 · github/github-mcp-server · GitHub

Open Graph Title: Fix #3755: avoid creating orphan branch when push_files fails by genius-0963 · Pull Request #3778 · github/github-mcp-server

X Title: Fix #3755: avoid creating orphan branch when push_files fails by genius-0963 · Pull Request #3778 · github/github-mcp-server

Description: Summary Avoids leaving behind an orphan branch pointing at the default branch's HEAD when push_files fails during tree or commit creation. Why Fixes #3755 When push_files pushed to a branch that did not exist, it previously created the new branch reference pointing to the default branch's HEAD commit upfront before creating the tree and commit. If creating the tree (e.g. malformed path component) or creating the commit failed, the new branch reference was not rolled back, leaving behind an orphan branch at the default branch's HEAD. What changed In pkg/github/repositories.go (PushFiles), deferred branch reference creation for new branches until after the tree and commit objects have been successfully created. Created the new branch reference directly pointing at the new commit SHA via client.Git.CreateRef, eliminating the orphan branch creation when tree or commit operations fail. Removed unused helper createReferenceFromDefaultBranch in pkg/github/repositories_helper.go. Added unit tests in pkg/github/repositories_test.go covering successful push to a new branch, tree creation failure on a new branch (ensuring no branch ref is created), and commit creation failure on a new branch (ensuring no branch ref is created). MCP impact Tool schema or behavior changed push_files behavior is improved so that failed pushes to a non-existent branch leave the repository unchanged without leaving an orphan branch reference. The tool schema and output types remain unchanged. Prompts tested (tool changes only) "Push file docs/readme.md with content 'hello' to new branch feature-test" (successfully creates the branch directly at the commit) Security / limits No security or limits impact Tool renaming I am not renaming tools as part of this PR Lint & tests Linted locally with ./script/lint Tested locally with ./script/test Docs Not needed

Open Graph Description: Summary Avoids leaving behind an orphan branch pointing at the default branch's HEAD when push_files fails during tree or commit creation. Why Fixes #3755 When push_files pushed to a branch tha...

X Description: Summary Avoids leaving behind an orphan branch pointing at the default branch's HEAD when push_files fails during tree or commit creation. Why Fixes #3755 When push_files pushed to a branch...

Opengraph URL: https://github.com/github/github-mcp-server/pull/3778

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.112.3

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:9c9ec3d0-fbf1-03dc-a28d-6a10307dcb4a
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD4C0:11C350:849E9:B4140:6B05F592
html-safe-nonce1fc741e46186a83f57859524444b8a2da0e40d508185cebac99d8791820bb712
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENEMwOjExQzM1MDo4NDlFOTpCNDE0MDo2QjA1RjU5MiIsInZpc2l0b3JfaWQiOiI1MDQ5MzQ3MTEzMjg1NDQ5MTA2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacc32ea60845f8f9d94076ead5590c5a542cc17e821ba2a63574c81b1588b17611
hovercard-subject-tagpull_request:5227938731
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/github/github-mcp-server/pull/3778/files
twitter:imagehttps://avatars.githubusercontent.com/u/79242161?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/79242161?s=400&v=4
og:image:altSummary Avoids leaving behind an orphan branch pointing at the default branch's HEAD when push_files fails during tree or commit creation. Why Fixes #3755 When push_files pushed to a branch tha...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonec214754a6652274794ed4e054a7b71be999d69843f103ba54893001d45010ece
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/github/github-mcp-server git https://github.com/github/github-mcp-server.git
octolytics-dimension-user_id9919
octolytics-dimension-user_logingithub
octolytics-dimension-repository_id942771284
octolytics-dimension-repository_nwogithub/github-mcp-server
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id942771284
octolytics-dimension-repository_network_root_nwogithub/github-mcp-server
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release7d164a4e71eb333b2b17fd5b17e18efb7855505c
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/github/github-mcp-server/pull/3778/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fgithub-mcp-server%2Fpull%2F3778%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fgithub-mcp-server%2Fpull%2F3778%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=github%2Fgithub-mcp-server
Reloadhttps://github.com/github/github-mcp-server/pull/3778/files
Reloadhttps://github.com/github/github-mcp-server/pull/3778/files
Reloadhttps://github.com/github/github-mcp-server/pull/3778/files
githubhttps://github.com/github
github-mcp-serverhttps://github.com/github/github-mcp-server
Codehttps://github.com/github/github-mcp-server
Issues238 (238)https://github.com/github/github-mcp-server/issues
Pull requests226 (226)https://github.com/github/github-mcp-server/pulls
Discussionshttps://github.com/github/github-mcp-server/discussions
Actionshttps://github.com/github/github-mcp-server/actions
Security and quality2 (2)https://github.com/github/github-mcp-server/security
Insightshttps://github.com/github/github-mcp-server/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fgithub%2Fgithub-mcp-server%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fgithub%2Fgithub-mcp-server%2Fissues%2Fnew%2Fchoose
genius-0963https://github.com/genius-0963
github:mainhttps://github.com/github/github-mcp-server/tree/main
genius-0963:fix/issue-3755https://github.com/genius-0963/github-mcp-server/tree/fix/issue-3755
Conversation 1 https://github.com/github/github-mcp-server/pull/3778
Commits 1 https://github.com/github/github-mcp-server/pull/3778/commits
Checks 1 https://github.com/github/github-mcp-server/pull/3778/checks
Findings https://github.com/github/github-mcp-server/pull/3778/findings
Files changed https://github.com/github/github-mcp-server/pull/3778/files
Please reload this pagehttps://github.com/github/github-mcp-server/pull/3778/files
Fix #3755: avoid creating orphan branch when push_files fails https://github.com/github/github-mcp-server/pull/3778/files#top
Show all changes 1 commit https://github.com/github/github-mcp-server/pull/3778/files
0018a2d Fix #3755: avoid creating orphan branch when push_files fails genius-0963 Nov 9, 2026 https://github.com/github/github-mcp-server/pull/3778/commits/0018a2db73454a0794973c560202decc85296686
Clear filters https://github.com/github/github-mcp-server/pull/3778/files
Please reload this pagehttps://github.com/github/github-mcp-server/pull/3778/files
Please reload this pagehttps://github.com/github/github-mcp-server/pull/3778/files
repositories.go https://github.com/github/github-mcp-server/pull/3778/files#diff-396c76ab9d216fd1d9043c561bf2bfe57ade719aa0c0cedb47e85b3277714b92
repositories_helper.go https://github.com/github/github-mcp-server/pull/3778/files#diff-604dc0762cb290ada20412e44074f14cc6969e1ceeeb35d326603fa18af07fb3
repositories_test.go https://github.com/github/github-mcp-server/pull/3778/files#diff-1f37596d401182a6443ebc5cf77fd4451cb48bd6f8a3ca31742a7a29feed4279
https://github.com/github/github-mcp-server/blob/main/.github/CODEOWNERS#L1
pkg/github/repositories.gohttps://github.com/github/github-mcp-server/pull/3778/files#diff-396c76ab9d216fd1d9043c561bf2bfe57ade719aa0c0cedb47e85b3277714b92
View file https://github.com/github/github-mcp-server/blob/0018a2db73454a0794973c560202decc85296686/pkg/github/repositories.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/github-mcp-server/pull/3778/{{ revealButtonHref }}
https://github.com/github/github-mcp-server/pull/3778/files#diff-396c76ab9d216fd1d9043c561bf2bfe57ade719aa0c0cedb47e85b3277714b92
https://github.com/github/github-mcp-server/pull/3778/files#diff-396c76ab9d216fd1d9043c561bf2bfe57ade719aa0c0cedb47e85b3277714b92
https://github.com/github/github-mcp-server/pull/3778/files#diff-396c76ab9d216fd1d9043c561bf2bfe57ade719aa0c0cedb47e85b3277714b92
https://github.com/github/github-mcp-server/pull/3778/files#diff-396c76ab9d216fd1d9043c561bf2bfe57ade719aa0c0cedb47e85b3277714b92
https://github.com/github/github-mcp-server/pull/3778/files#diff-396c76ab9d216fd1d9043c561bf2bfe57ade719aa0c0cedb47e85b3277714b92
https://github.com/github/github-mcp-server/blob/main/.github/CODEOWNERS#L1
pkg/github/repositories_helper.gohttps://github.com/github/github-mcp-server/pull/3778/files#diff-604dc0762cb290ada20412e44074f14cc6969e1ceeeb35d326603fa18af07fb3
View file https://github.com/github/github-mcp-server/blob/0018a2db73454a0794973c560202decc85296686/pkg/github/repositories_helper.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/github-mcp-server/pull/3778/{{ revealButtonHref }}
https://github.com/github/github-mcp-server/pull/3778/files#diff-604dc0762cb290ada20412e44074f14cc6969e1ceeeb35d326603fa18af07fb3
https://github.com/github/github-mcp-server/pull/3778/files#diff-604dc0762cb290ada20412e44074f14cc6969e1ceeeb35d326603fa18af07fb3
https://github.com/github/github-mcp-server/blob/main/.github/CODEOWNERS#L1
pkg/github/repositories_test.gohttps://github.com/github/github-mcp-server/pull/3778/files#diff-1f37596d401182a6443ebc5cf77fd4451cb48bd6f8a3ca31742a7a29feed4279
View file https://github.com/github/github-mcp-server/blob/0018a2db73454a0794973c560202decc85296686/pkg/github/repositories_test.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/github-mcp-server/pull/3778/{{ revealButtonHref }}
https://github.com/github/github-mcp-server/pull/3778/files#diff-1f37596d401182a6443ebc5cf77fd4451cb48bd6f8a3ca31742a7a29feed4279
https://github.com/github/github-mcp-server/pull/3778/files#diff-1f37596d401182a6443ebc5cf77fd4451cb48bd6f8a3ca31742a7a29feed4279
https://github.com/github/github-mcp-server/pull/3778/files#diff-1f37596d401182a6443ebc5cf77fd4451cb48bd6f8a3ca31742a7a29feed4279
https://github.com/github/github-mcp-server/pull/3778/files#diff-1f37596d401182a6443ebc5cf77fd4451cb48bd6f8a3ca31742a7a29feed4279
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.