2019-07-30 01:02:59 -04:00
---
2020-07-29 08:09:45 -04:00
stage: Create
group: Source Code
info: "To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers"
2019-07-30 01:02:59 -04:00
type: howto
---
2015-07-01 23:23:31 -04:00
2019-08-27 21:32:09 -04:00
# Create a project
2017-08-16 04:05:44 -04:00
2019-07-30 01:02:59 -04:00
Most work in GitLab is done within a [Project ](../user/project/index.md ). Files and
code are saved in projects, and most features are used within the scope of projects.
## Create a project in GitLab
2015-07-01 23:23:31 -04:00
2019-01-24 01:56:42 -05:00
To create a project in GitLab:
2015-07-01 23:23:31 -04:00
2019-01-24 01:56:42 -05:00
1. In your dashboard, click the green **New project** button or use the plus
icon in the navigation bar. This opens the **New project** page.
1. On the **New project** page, choose if you want to:
- Create a [blank project ](#blank-projects ).
2020-10-08 14:08:32 -04:00
- Create a project using one of the available [project templates ](#project-templates ).
2019-01-24 01:56:42 -05:00
- [Import a project ](../user/project/import/index.md ) from a different repository,
2020-10-02 20:08:46 -04:00
if enabled on your GitLab instance. Contact your GitLab administrator if this is unavailable.
2019-07-08 04:50:38 -04:00
- Run [CI/CD pipelines for external repositories ](../ci/ci_cd_for_external_repos/index.md ). ** (PREMIUM)**
2015-07-01 23:23:31 -04:00
2019-07-30 01:02:59 -04:00
NOTE: **Note:**
2020-10-07 17:08:21 -04:00
For a list of words that can't be used as project names see
2019-07-30 01:02:59 -04:00
[Reserved project and group names ](../user/reserved_names.md ).
### Blank projects
2015-07-01 23:23:31 -04:00
2019-01-24 01:56:42 -05:00
To create a new blank project on the **New project** page:
2017-08-20 16:43:34 -04:00
2019-01-24 01:56:42 -05:00
1. On the **Blank project** tab, provide the following information:
2019-07-17 21:15:58 -04:00
- The name of your project in the **Project name** field. You can't use
2020-10-07 17:08:21 -04:00
special characters, but you can use spaces, hyphens, underscores, or even
2020-10-19 17:09:06 -04:00
emoji. When adding the name, the **Project slug** auto populates.
The slug is what the GitLab instance uses as the URL path to the project.
2020-01-17 16:08:29 -05:00
If you want a different slug, input the project name first,
then change the slug after.
- The path to your project in the **Project slug** field. This is the URL
2020-10-19 17:09:06 -04:00
path for your project that the GitLab instance uses. If the
**Project name** is blank, it auto populates when you fill in
2020-01-17 16:08:29 -05:00
the **Project slug** .
2019-07-17 21:15:58 -04:00
- The **Project description (optional)** field enables you to enter a
2020-10-19 17:09:06 -04:00
description for your project's dashboard, which helps others
2019-07-17 21:15:58 -04:00
understand what your project is about. Though it's not required, it's a good
idea to fill this in.
- Changing the **Visibility Level** modifies the project's
[viewing and access rights ](../public_access/public_access.md ) for users.
- Selecting the **Initialize repository with a README** option creates a
README file so that the Git repository is initialized, has a default branch, and
can be cloned.
2017-05-02 06:19:48 -04:00
1. Click **Create project** .
2019-07-30 01:02:59 -04:00
### Project templates
2019-01-24 01:56:42 -05:00
2019-07-30 01:02:59 -04:00
Project templates can pre-populate a new project with the necessary files to get you
started quickly.
2019-01-24 01:56:42 -05:00
2020-10-16 14:09:04 -04:00
There are two main types of project templates:
2019-01-24 01:56:42 -05:00
2019-03-26 08:08:27 -04:00
- [Built-in templates ](#built-in-templates ), sourced from the following groups:
- [`project-templates` ](https://gitlab.com/gitlab-org/project-templates )
- [`pages` ](https://gitlab.com/pages )
2020-09-07 11:09:04 -04:00
- [Custom project templates ](#custom-project-templates ), for custom templates
2019-07-30 01:02:59 -04:00
configured by GitLab administrators and users.
2019-01-24 01:56:42 -05:00
2019-07-30 01:02:59 -04:00
#### Built-in templates
2019-01-24 01:56:42 -05:00
Built-in templates are project templates that are:
2019-07-30 01:02:59 -04:00
- Developed and maintained in the [`project-templates` ](https://gitlab.com/gitlab-org/project-templates )
and [`pages` ](https://gitlab.com/pages ) groups.
2019-01-24 01:56:42 -05:00
- Released with GitLab.
To use a built-in template on the **New project** page:
2019-05-05 11:59:22 -04:00
1. On the **Create from template** tab, select the **Built-in** tab.
2019-01-24 01:56:42 -05:00
1. From the list of available built-in templates, click the:
2019-07-17 21:15:58 -04:00
- **Preview** button to look at the template source itself.
- **Use template** button to start creating the project.
2019-07-30 01:02:59 -04:00
1. Finish creating the project by filling out the project's details. The process is
the same as creating a [blank project ](#blank-projects ).
2019-01-24 01:56:42 -05:00
2020-04-13 17:09:38 -04:00
##### Enterprise templates **(ULTIMATE)**
GitLab is developing Enterprise templates to help you streamline audit management with selected regulatory standards. These templates automatically import issues that correspond to each regulatory requirement.
To create a new project with an Enterprise template, on the **New project** page:
1. On the **Create from template** tab, select the **Built-in** tab.
1. From the list of available built-in Enterprise templates, click the:
- **Preview** button to look at the template source itself.
- **Use template** button to start creating the project.
1. Finish creating the project by filling out the project's details. The process is the same as creating a [blank project ](#blank-projects ).
Available Enterprise templates include:
- HIPAA Audit Protocol template ([introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/13756) in GitLab 12.10)
2019-01-24 01:56:42 -05:00
TIP: **Tip:**
2019-07-30 01:02:59 -04:00
You can improve the existing built-in templates or contribute new ones in the
[`project-templates` ](https://gitlab.com/gitlab-org/project-templates ) and
2020-04-13 17:09:38 -04:00
[`pages` ](https://gitlab.com/pages ) groups by following [these steps ](https://gitlab.com/gitlab-org/project-templates/contributing ).
2019-01-24 01:56:42 -05:00
2019-08-02 02:55:01 -04:00
#### Custom project templates **(PREMIUM)**
2019-01-24 01:56:42 -05:00
2020-05-20 23:08:00 -04:00
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/6860) in [GitLab Premium](https://about.gitlab.com/pricing/) 11.2.
2019-01-24 01:56:42 -05:00
2019-10-02 08:06:04 -04:00
Creating new projects based on custom project templates is a convenient option for
quickly starting projects.
2019-01-24 01:56:42 -05:00
2019-07-30 01:02:59 -04:00
Custom projects are available at the [instance-level ](../user/admin_area/custom_project_templates.md )
from the **Instance** tab, or at the [group-level ](../user/group/custom_project_templates.md )
from the **Group** tab, under the **Create from template** tab.
2019-01-24 01:56:42 -05:00
To use a custom project template on the **New project** page:
1. On the **Create from template** tab, select the **Instance** tab or the **Group** tab.
1. From the list of available custom templates, click the:
2019-07-17 21:15:58 -04:00
- **Preview** button to look at the template source itself.
- **Use template** button to start creating the project.
2019-07-30 01:02:59 -04:00
1. Finish creating the project by filling out the project's details. The process is
the same as creating a [blank project ](#blank-projects ).
2019-01-24 01:56:42 -05:00
2018-01-31 08:52:46 -05:00
## Push to create a new project
2020-05-20 23:08:00 -04:00
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/26388) in GitLab 10.5.
2018-01-31 08:52:46 -05:00
2020-10-19 17:09:06 -04:00
When you create a new repository locally, instead of manually creating a new project in GitLab
and then [cloning the repository ](start-using-git.md#clone-a-repository )
2019-07-30 01:02:59 -04:00
locally, you can directly push it to GitLab to create the new project, all without leaving
2020-10-19 17:09:06 -04:00
your terminal. If you have access rights to the associated namespace, GitLab
automatically creates a new project under that GitLab namespace with its visibility
2019-07-30 01:02:59 -04:00
set to Private by default (you can later change it in the [project's settings ](../public_access/public_access.md#how-to-change-project-visibility )).
2018-01-31 08:52:46 -05:00
2019-01-24 01:56:42 -05:00
This can be done by using either SSH or HTTPS:
2018-01-31 08:52:46 -05:00
2020-01-30 10:09:15 -05:00
```shell
2018-01-31 08:52:46 -05:00
## Git push using SSH
2018-02-23 04:00:19 -05:00
git push --set-upstream git@gitlab.example.com:namespace/nonexistent-project.git master
2018-01-31 08:52:46 -05:00
2019-01-24 01:56:42 -05:00
## Git push using HTTPS
2018-02-23 04:00:19 -05:00
git push --set-upstream https://gitlab.example.com/namespace/nonexistent-project.git master
2018-01-31 08:52:46 -05:00
```
2020-10-19 17:09:06 -04:00
Once the push finishes successfully, a remote message indicates
2018-01-31 08:52:46 -05:00
the command to set the remote and the URL to the new project:
2020-05-19 23:08:04 -04:00
```plaintext
2018-01-31 08:52:46 -05:00
remote:
remote: The private project namespace/nonexistent-project was created.
remote:
remote: To configure the remote, run:
2018-02-02 10:27:30 -05:00
remote: git remote add origin https://gitlab.example.com/namespace/nonexistent-project.git
2018-01-31 08:52:46 -05:00
remote:
remote: To view the project, visit:
2018-02-02 10:27:30 -05:00
remote: https://gitlab.example.com/namespace/nonexistent-project
2018-01-31 08:52:46 -05:00
remote:
```
2019-07-30 01:02:59 -04:00
<!-- ## Troubleshooting
Include any troubleshooting steps that you can foresee. If you know beforehand what issues
one might have when setting this up, or when something is changed, or on upgrading, it's
important to describe those, too. Think of things that may go wrong and include them here.
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
Each scenario can be a third-level heading, e.g. `### Getting error message X` .
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->