The issue: There is a folder in my GitHub repo, in a branch called 'my-branch' and it needs to be removed. It is not the last commit.
Details of issue:
Desired Outcome:
PLEASE HELP
If the branch is straight (at least, since adding that directory), it's rather simple to correct
git rebase -i the-commit-where-the-directory-was-added~ # do _not_ skip the pig tail, it has to biñe there
# the commit should be the first in tbe list
# change pick for edit in that commit only
# save exit
# rebase will stop right after applying that commit
git rm --cached the-directory
# consider adding the directory to .gitignore and add it also so it's not added by mistake later
git commit --amend --no-edit
git rebase --continue
When it finishes running, you should have a branch without the directory