From "Create mvn project" to "Create remote repository in GitLab" to "git init"

A memorandum because my senior taught me.

* * Premise * *

--Being able to log in to GitLab --Create a project under the following conditions --Group name: xxx --Project name: hoge --Framework: Spring

Let's get started! !! !!

1. Create mvn project locally

#Move appropriately
cd hoge

#Create an mvn project with the following command
mvn archetype:generate

If you do this, you will be asked various things, so I will answer.

Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): 932: -** Enter "spring" ** -(** "There are 932 templates, but which one do you use?" **, so ** "Because there are too many, focus on spring" ** Image)

Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): : -Enter ** number ** -(A large number of templates are displayed like the following, so select the appropriate one and enter the number on the far left) - ( ex: 115: remote -> org.springframework.boot:spring-boot-sample-web-static-archetype (Spring Boot Web Static Sample )

Define value for property 'groupId': -** Enter "xxx" ** -(** I was asked like "Which group do you belong to?" **, so the image is that you are responding ** "xxx!" **)

Define value for property 'artifactId': -** Enter "hoge" ** -(** "What kind of deliverable (project) do you want to make?" **, so ** "It's hoge" ** Image of responding)

Define value for property 'version' 1.0-SNAPSHOT: : -** No input ** Enter -(I'm not sure (), but the default is OK)

Define value for property 'package' sapri: : -** No input ** Enter -(I'm not sure (), but the default is OK)

Y: : -** Enter "Y" ** -(** "Is this okay?" ** is asked, so ** "OK!" ** is the image of responding)

2. Add a project to GitLab

--Open your browser and log in to ** GitLab ** --Select ** "New Project" ** at the top right of the top screen --Set the following -** "Project Name" : Project name - 「Visibility Level」:Private - Select "Create Project" **

Add a user to the project created in 3.3

--Move to the project created in 3 --Select "Members" ** from ** "Gears" in the upper right corner -** There is a dropdown with a default value of "Guest" , so change it to "Master" - There is a text box ** with "Search for a user" in the placeholder, so enter the user you want to add -** Select "Add to project" **

4. Init the project in GitLab

cd hoge
git init
git add .
git commit -m "Nice and cool comments"
git push -u origin master

With the above command, reflect the project of 2 in GitLab of 3.

that's all.

Recommended Posts

From "Create mvn project" to "Create remote repository in GitLab" to "git init"
How to create a Spring Boot project in IntelliJ
The road from Git clone to building the environment and participating in the project (all in full)
Ssh connect from container to git with VSCode Remote Container
[Docker context] ~ How to access docker in remote environment from VScode ~
How to create a new Gradle + Java + Jar project in Intellij 2016.03
Addicted to project imports from GitHub
Change from SQLite3 to PostgreSQL in a new Ruby on Rails project
How to develop from VScode in a remote destination environment or a remote destination container environment
Try to get data from database using MyBatis in Micronaut + Kotlin project