-2

I have a two branches in my projects:

  • Main
  • Developper

I want to delete all the content (files and directories) of the Developper branch without deleting the branch from the repo.

  • Why did you not delete all the files and directories and add these changes to the staging area and make a new commit? – mkrieger1 Apr 17 '22 at 19:04
  • Does this answer your question? [Make the current commit the only (initial) commit in a Git repository?](https://stackoverflow.com/questions/9683279/make-the-current-commit-the-only-initial-commit-in-a-git-repository) – Arty-chan Apr 17 '22 at 19:15

1 Answers1

0

You can checkout onto the developper branch and manually delete all files and directories. Then commit these changes and push them. This will tell git to delete all files just from this branch.

Joshua Zeltser
  • 365
  • 1
  • 8