Link Spring Boot Project to GitHub Repository
Below is a guide to link your Spring Boot Project to the GitHub repository. If you want to create a Spring Application, refer to this blog.
Step-By-Step Guide to Link Spring Boot to GitHub Repository.
Create a new GitHub repository on GitHub:
Let’s suppose we are creating an eCommerce website.
Click on the “Create repository” button.
On the next page, copy the following command:
git remote add origin
https://github.com/Siddpawar9222/ecommerce-website.git
Let’s suppose you created a new Spring Boot project named ecommerce-website
.Open this project and open Git Bash or CND in this directory.
Initialize the Git directory using the command: git init
Stage and commit changes using the command:
git add . git commit -m "created ecommerce website project"
Add the GitHub repository by pasting and executing the command we copied in Step 1:
git remote add origin
https://github.com/Siddpawar9222/ecommerce-website.git
Push changes to GitHub using the command: git push origin master
On the GitHub repository, you can see that we have connected the local Git repo to the GitHub repository. The master branch is also created, and all changes are pushed to GitHub.
Congratulations! You have successfully created a Spring Boot Application and linked it to GitHub.
Watch our YouTube Video to work with GitHub and learn the PR process.