Answer the question
In order to leave comments, you need to log in
How to remove redundant files from a commit?
Good afternoon!
The commit got files that were not supposed to get there and the commit was shipped to the repository in a separate branch. At the end of the task, one of all commits will be made through squash and transferred to the main branch. How do I remove redundant files from my branch so they don't get pushed back to main when I do a cherry pick?
Answer the question
In order to leave comments, you need to log in
git rm -r --cached file1 file2 file3
git commit -m 'remove files from git'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question