Follow these steps to add a file to your Gitlab repository:
1. Open a terminal/shell, and change into the folder of your GitLab project.
2. Check if git is installed on your machine by typing command:
If git is not installed, type the following command to install git on your machine:
sudo apt install git-all
3. To add your file, type the following command:
git add <name of file>
4. Commit (save) your file to the repository:
git commit -m "DESCRIBE COMMIT IN A FEW WORDS"
5. Now you can push (send) your changes (in the branch <branch-name>) to GitLab (the git remote named ‘origin’):
git push origin <branch-name>
e.g. git push origin master
Your file will be added to your branch in your repository in GitLab.