Deleting, renaming, or moving a file or folder in a SourceCraft repository with Git

SourceCraft utilizes the Git version control system for repository file management. The standard process is to work with files in a local copy of the repository, then use git to push those changes to the remote SourceCraft repository.

For more information on working with git, see this page.

Tip

As an alternative option, you can also use the SourceCraft interface to add files and folders directly to a repository.

To delete, rename, or move a file or folder in a repository using git:

  1. Clone the repository.

  2. Create a new branch for the changes and push it to the remote repository:

    git checkout -b new-feature
    git push -u origin new-feature
    

    Note

    You can also push changes directly to the main branch, but a safer option is to use separate branches and pull requests.

  3. Make changes to the file structure in your local copy of the repository: delete, rename, or move a file or folder. You can do this in any file manager, such as File Explorer in Windows or Finder in macOS.

  4. Make changes to the git index, then commit and push the changes to the remote repository:

    git add .
    git commit -m "updated file structure"
    git push origin new-feature
    
  5. Create a pull request from the new branch and merge it into the repository's main branch.

See also