GitLab Tutorial
GitLab Basics
GitLab Users and Groups
GitLab Issue Tracker
GitLab Instance Management
GitLab Continuous Integration
Selected Reading
GitLab Basics
- GitLab - Squashing Commits
- GitLab - Rebase Operation
- GitLab - Add a File
- GitLab - Create a Branch
- GitLab - Fork a Project
- GitLab - Create Project
- GitLab - SSH Key Setup
- GitLab - Git Commands
- GitLab - Installation
- GitLab - Introduction
GitLab Users and Groups
GitLab Issue Tracker
- GitLab - Wiki Pages
- GitLab - Milestones
- GitLab - Referencing Issues
- GitLab - Merge Requests
- GitLab - Create Issue
GitLab Instance Management
GitLab Continuous Integration
- GitLab CI - Container Registry
- GitLab CI - Cycle Analytics
- GitLab CI - Advanced usage of CI
- Configuring GitLab Runners
- GitLab CI - Permissions
- GitLab - CI/CD Variables
- GitLab - CI/CD
- GitLab CI - Introduction
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
GitLab - Add a File
GitLab - Add a File
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 −

Step 2 − Now go to your project directory and you will see the created 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 −

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

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