Skip to content

Instantly share code, notes, and snippets.

@naranyala
Created September 12, 2023 10:03
Show Gist options
  • Save naranyala/736e4720a208d1fd33e03ea61b8e38c9 to your computer and use it in GitHub Desktop.
Save naranyala/736e4720a208d1fd33e03ea61b8e38c9 to your computer and use it in GitHub Desktop.
remove unnecessary directory from repository
#/bin/bash
git_rmdir() {
if [ $# -eq 0 ]; then
echo "Usage: git-rmdir <directory>"
return 1
fi
git rm -r --cached "$1"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment