info: "To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments"
Adding files to a repository is a small, but key, task. No matter where the code,
images, or documents were created, Git tracks them after you add them to your repository.
## Add an existing file
To add an existing file to your repository, either:
- Upload the file from the GitLab UI.
- Add a file to your repository from the command line, then push the file up to GitLab.
### From the UI
If you are unfamiliar with the command line, use the
[Web Editor](../user/project/repository/web_editor.md) to upload a file from the GitLab UI:
<!-- Original source for this list: doc/user/project/repository/web_editor.md#upload-a-file -->
<!-- For why we duplicated the info, see https://gitlab.com/gitlab-org/gitlab/-/merge_requests/111072#note_1267429478 -->
1. On the top bar, select **Main menu > Projects** and find your project.
1. From the project dashboard or repository, next to the branch name, select the plus icon (**{plus}**).
1. From the dropdown list, select **Upload file**.
1. Complete the fields. To create a merge request with the uploaded file, ensure the **Start a new merge request with these changes** toggle is turned on.
1. Select **Upload file**.
### From the command line
To add a new file from the command line:
1. Open a terminal (or shell) window.
1. Use the "change directory" (`cd`) command to go to your GitLab project's folder.
Run the `cd DESTINATION` command, changing `DESTINATION` to the location of your folder.
1. Choose a Git branch to work in. You can either: