English 中文(简体)
GitLab - Add a File
  • 时间:2024-10-18

GitLab - Add a File


Previous Page Next Page  

In this chapter, we will discuss about how to add a file to a project in the GitLab. We can add file in two ways −

    Using Command Line Interface

    Using Web Interface

Creating a file using Command Line Interface

Step 1 − To create a file by using command pne interface, type the below command in your project directory −

GitLab Create File

Step 2 − Now go to your project directory and you will see the created file −

GitLab Create File

Creating a file using Web Interface

Step 1 − You can create a new file, by cpcking on the + button which is at the right side of the branch selector in the dashboard −

GitLab Create File

Step 2 − Enter the file name, add some content in the editor section and cpck on the Commit changes button to create the file.

GitLab Create File

Step 3 − Now you will get a successful message after creating the file as shown below −

GitLab Create File Advertisements