Last active
May 5, 2025 05:29
-
-
Save gauravkhuraana/56ccc98257dbf9524f01d390cd92ad3d to your computer and use it in GitHub Desktop.
Remove Unwanted Files from a PR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git checkout your-branch-name | |
git restore --source origin/main -- . ':!file1.txt' ':!folder/file2.cs' ':!src/file3.json' | |
git add . | |
git commit -m "Keep only selected files in PR" | |
git push |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment