This guide provides step-by-step instructions for downloading, cleaning, and re-uploading your GitHub repository.
- Open a terminal on your device (e.g., in PythonEditor or another app).
- Clone the repository:
git clone https://github.com/Okeamah/<repo-name>.git cd <repo-name>
- Open your browser and navigate to your repository on GitHub.
- Click the green "Code" button and select "Download ZIP".
- Extract the ZIP file to a folder on your device.
- Navigate to the extracted repository folder (for ZIP) or the cloned folder (for Git).
- Remove unwanted files or directories:
- Using a file manager, delete files manually.
- Using Git, run:
rm <file-name>
- Update content like the
README.mdfile if needed.
- Stage and commit your changes:
git add . git commit -m "Cleaned up repository"
- Push changes back to GitHub:
git push
- Compress the cleaned folder into a new ZIP file.
- Open your browser and go to your GitHub repository.
- Drag and drop the cleaned files (not the ZIP) into the repository interface.
- Commit the changes.
- View all branches:
git branch
- Delete unwanted branches:
git branch -d <branch-name>
- View remote branches:
git branch -r
- Delete unwanted remote branches:
git push origin --delete <branch-name>
- Rename your current repository on GitHub (e.g., to
repo-name-old):- Go to Settings in the repository.
- Rename it under Repository name.
- Create a new repository for the cleaned version (e.g.,
repo-name-clean). - Link your cleaned local repository to the new remote:
git remote set-url origin https://github.com/Okeamah/<new-repo-name>.git git push -u origin main
Follow these steps carefully. If you need additional help, feel free to ask!