Create a new file
Create and add a new file to a repository using the web UI.
Last updated
Create and add a new file to a repository using the web UI.
Last updated
Creating and adding new files to your repository is an integral part of updating your project's content.
Follow these steps to add a file to your repository on Protocol.Land:
Navigate to the main page of the repository and click “Add file” located on the top-left corner above the list of files.
Click “Create new file” from the modal you are prompted with.
You will be redirected to the file creation page.
Type in the desired file name along with its extension in the provided input field. You can also provide a path along with the file name like `folder/filename.ext` to create folders within the repository.
Note: The files and folders are created relative to the file path you click the “Create new file” in. If a folder already exists, it will simply add the file to it based on the provided path.
Type in your code in the provided code editor.
After making the changes, you have the option to “Cancel Changes” or “Commit Changes” to the active branch.
Click “Commit Changes”.
A modal will prompt you to add a commit message.
Type in the desired commit message that summarizes the changes.
Preview the estimated cost of committing your changes by hovering over the information icon.
Click “Commit changes”.
You will be redirected to the main page of the repository, where the updated files list of the active branch will now include the newly created file.