22 days ago
I have a Railway Production service connected to a GitHub repository. Its deployment trigger is explicitly connected to branch main, and Auto Deploy is enabled.
No commits, pushes, merges, branch deletions, branch renames, or branch-head changes will occur.
I want to temporarily change only the GitHub repository metadata property default_branch from the existing main branch to an existing staging branch, and later restore it from staging to main.
The Railway connected branch remains main throughout, and the SHA of main does not change.
Can either metadata-only operation by itself cause Railway to:
- create or queue a deployment;
- rebuild or redeploy the existing main commit;
- restart or replace the running service;
- treat the existing main commit as a missed/new commit; or
- otherwise trigger deployment behavior through the Railway GitHub App?
Please confirm separately for:
- default_branch: main → staging
- default_branch: staging → main
In particular, can restoring main as the GitHub default branch cause Railway Auto Deploy to replay or deploy a commit that was already present on main throughout the entire operation?
1 Replies
22 days ago
No. Changing the repository's default branch is a metadata-only change on GitHub, and neither direction (main → staging, or staging → main) by itself creates or queues a deployment, rebuilds or redeploys the existing main commit, restarts or replaces the running service, or treats that commit as new or missed.
Auto Deploy on a service connected to a specific branch is driven by pushes to that branch, so with main's SHA unchanged and no pushes, restoring main as the default branch will not replay or deploy a commit that was already on main.
The connected branch on your service is stored as main and does not follow the GitHub default branch, so the temporary change to staging does not redirect your Production trigger either.
Status changed to Awaiting User Response Railway • 22 days ago
13 days ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • 13 days ago