Skip to main content

Remove git repo without deleting the contents inside the repo path

Comments

3 comments

  • cPanelMichael
    Hello @luissquall, When you delete a repository, the system permanently deletes the entire contents of the repository's directory. You cannot recover this data after deletion. If you'd like to preserve the data, you must use SSH, FTP, or File Manager to copy or move the files and directories that you want to preserve to another location. We do restrict the creation of Git repositories on cPanel-controlled directories: [QUOTE]
    • Users cannot include whitespace or the following characters in repository paths: \ * | " ' < > & @ ` $ { } [ ] ( ) ; ? : = % #
    • Users cannot use this feature to create, delete, or view repositories in the following cPanel-controlled directories: Click to view...
      • .cpanel
      • .cphorde
      • .htpasswds
      • .ssh
      • .trash
      • access-logs
      • cgi-bin
      • etc
      • logs
      • perl5
      • mail
      • spamassassin
      • ssl
      • tmp
      • var
    Note: cPanel users cannot use the . or .. directory references when they enter the repository path in the interface.
    However, this is not extended to user-created directories. I encourage you to open a feature request if you'd like to see an option to preserve the contents of the directory, and remove just the Git repo itself:
    0
  • luissquall
    Thank you @cPanelMichael! I was hoping editing a yaml file or something could help me. I'll open a feature request then.
    0
  • cPanelMichael
    Hello @luissquall, cPanel & WHM version 76.0.4 was published today and includes the following change: Fixed case CPANEL-21276: Git version control no longer removes files from repository. Here's an updated description of what happens when you remove a repo via cPanel >> Git Version Control in cPanel & WHM version 76.0.4 and later: [QUOTE]When you remove cPanel's management of a repository, the repository will no longer appear in the interface, and you cannot use cPanel to deploy it. However, the system will not delete the repository directory or its data. To fully delete repository data, use cPanel's File Manager interface (cPanel >> Home >> Files >> File Manager) or your preferred method to manually delete the files.
    Thank you.
    0

Please sign in to leave a comment.