2015-07-23 20:11:17 -04:00
|
|
|
# How to add a file
|
|
|
|
|
|
|
|
You can create a file in your [shell](command-line-commands.md) or in GitLab.
|
|
|
|
|
2015-07-31 11:21:53 -04:00
|
|
|
To create a file in GitLab, sign in to GitLab.
|
2015-07-23 20:11:17 -04:00
|
|
|
|
|
|
|
Select a project on the right side of your screen:
|
|
|
|
|
|
|
|
![Select a project](basicsimages/select_project.png)
|
|
|
|
|
2015-07-27 19:46:30 -04:00
|
|
|
It's a good idea to [create a branch](create-branch.md), but it's not necessary.
|
2015-07-23 20:11:17 -04:00
|
|
|
|
|
|
|
Go to the directory where you'd like to add the file and click on the "+" sign next to the name of the project and directory:
|
|
|
|
|
|
|
|
![Create a file](basicsimages/create_file.png)
|
|
|
|
|
2015-07-27 19:46:30 -04:00
|
|
|
Name your file (you can't add spaces, so you can use hyphens or underscores). Don't forget to include the markup language you'd like to use :
|
2015-07-23 20:11:17 -04:00
|
|
|
|
|
|
|
![File name](basicsimages/file_name.png)
|
|
|
|
|
|
|
|
Add all the information that you'd like to include in your file:
|
|
|
|
|
|
|
|
![Add information](basicsimages/white_space.png)
|
|
|
|
|
|
|
|
Add a commit message based on what you just added and then click on "commit changes":
|
|
|
|
|
|
|
|
![Commit changes](basicsimages/commit_changes.png)
|
|
|
|
|
|
|
|
### Note
|
|
|
|
Besides its regular files, every directory needs a README.md or README.html file which works like an index, telling
|
|
|
|
what the directory is about. It's the first document you'll find when you open a directory.
|