Skip to content

Remove a file from your PR

wsmelton edited this page Jan 21, 2019 · 1 revision

Need to know which branch your PR is tied to?_ Go to the PR and near the bottom you should find a phrase similar to this:

Add more commits by pushing to the Adjust-CopyJob-MaintenancePlans branch on wsmelton/dbatools.

The most efficient way of doing this is with git command. As an example, let say I have a PR where the manifest file for the module shows up as being modified, dbatools.pds1 file. In order to remove that file from my PR and current feature branch I need to reset the content of that file back to the original state (e.g. state of HEAD for dbatools/development` branch).

This assumes your remotes are setup as below, with the origin being your fork of dbatools repository (e.g. username/dbatools) and the upstream remote being sqlcollaborative/dbatools. The following command will reset the dbatools.psd1 file to the version in the upstream branch.

git checkout upstream/development .\dbatools.psd1

After the above command executes you simply need to push the changes for the PR to be refreshed on GitHub.