Is there any way to make a draft pull request using git bash?

I want to make a draft pull request but when I execute the command git push --set-upstream origin new-branch I could only see normal pull request button at my repository. Even though I've all the permission to the repository. So is there any way to make a draft pull request using git bash ?


Solution 1:

Pull requests are not a Git feature, which means you literally cannot make them with Git.

You make pull requests on GitHub using GitHub features. As shown in the introduction, you do this on GitHub using the clicky buttons there: having done your git push origin, you navigate to the correct page, start the process, then use the drop-down field to select the "draft" type of pull request.

Note that draft PRs are not available in all types of GitHub repository. For details, see the GitHub documentation on draft PRs.

Solution 2:

A pull request generally is created when some unit of work which is ready to be used has been completed. In your case, you are sitting on some intermediate work, not yet ready to generate a pull request. Therefore, I would just suggest that you commit your work and push your branch to the repository. Most enterprise Git providers, such as BitBucket and GitHub, have features which would allow someone else to view a diff of your intermediate branch against some target branch. Based on this diff, they may give you feedback. All this can be done without creating a formal pull request.