I have a project deployed on Vercel, and it’s currently set to deploy from the main branch of my repository. I need to change the deployment branch to a different branch (e.g., develop).
Could someone guide me through the steps to change the branch used for deployment in Vercel? Any detailed instructions or screenshots would be highly appreciated.
I’ve looked through the Vercel dashboard and settings but haven’t been able to find a clear option to change the branch for the deployment.
Thanks in advance!
>Solution :
To change the branch for your deployment in Vercel, follow these steps:
Navigate to Your Project:
Log in to your Vercel account.
Go to the Vercel dashboard and select the project for which you want to change the branch.
Access Project Settings:
Click on the project name to open its details.
Go to the "Settings" tab located at the top of the page.
Modify Git Settings:
In the settings sidebar, find and click on "Git".
Under the "Git" section, you will see a dropdown labeled "Production Branch" or "Git Branch".
Click on the dropdown menu and select the branch you want to use for deployments (e.g., develop).
Save Changes:
After selecting the desired branch, make sure to save your changes.
Vercel will now use the specified branch for future deployments.
Screenshots for Reference:
Unfortunately, Stack Overflow answers typically do not include screenshots directly. However, if needed, you can refer to the Vercel documentation for visual guidance.
Additional Tips:
Ensure that your new branch is up-to-date and contains the necessary configuration files for deployment.
You can also set up preview branches if you want to test deployments from multiple branches simultaneously.
By following these steps, you should be able to change the deployment branch in Vercel with ease. If you encounter any issues, feel free to ask for further assistance!