I will like to perform a pull and merge request but also I would like to exclude some files from this pull request.
Example: a.py b.py c.py
I would like to peform a pull request and merge except b.py
file.
What is the easiest way to accomplish this?
[edit] the file is not committed it yet.
If you want to ignore a file that you've committed in the past, you'll need to delete the file from your repository and then add a .gitignore rule for it. Using the --cached option with git rm means that the file will be deleted from your repository, but will remain in your working directory as an ignored file.
Now, if you have write permission, you can click on the 'trash' icon for a file right in the pull request's “Files changed” view to make a commit and remove it.
Make two branches from where you are right now, for example my-pull-request
and other-change
.
Commit a.py and c.py to my-pull-request
, and b.py to other-change
. Push the my-pull-request
branch to Github, and create the pull request.
Commit a.py
and c.py
, git stash
the rest, perform the request, then git stash pop
to restore your b.py
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With