Skip to content

Remove files from your Pull Request

ruqpyL2 edited this page Jun 20, 2021 · 2 revisions

try this.. if you want to remove a unnecessary file from your pr...

The following command will give you the commit hash for the last commit on the upstream/gh-pages branch

git rev-parse upstream/gh-pages

This next command reverts the file(s) that you want

git checkout <THE COMMIT HASH FROM PREVIOS STEP> -- <PATH OF FILES YOU WANT TO REVERT (seperated by a space)>

Here is an example

git checkout 9af8d8c7f34cb4dfda49cd8372236f8b8bd1ea65 -- pages/wins/wins.html _sass/components/_wins-page.scss

also... you only need the first seven digits of the commit hash (also known as SHA value).. so it can look like this

git checkout 9af8d8c -- pages/wins/wins.html _sass/components/_wins-page.scss

Clone this wiki locally