Now we will upload our project to GIT.
What is git?
Git is a distributed version-control system for tracking changes in any set of files, originally designed for coordinating work among programmers cooperating on source code during software development. Its goals include speed, data integrity, and support for distributed, non-linear workflows.
Let’s upload our project to GitHub:
First of all we will create an account in github.
Then go to create a new repository.
Give repo name. Click on Add Readme and Add gitignore button. Select java after selecting gitignore.
Then click on Create Repository button.
Then you will see repository has been created.
Now click on code and copy the repo url
now go to your project directory. Add following folder names in .gitignore file so that git does not upload in server.
Then open the command prompt or open git bash.
Execute following commands:
git init git remote add origin "<REPO_URL>" git add . git commit -m 'upload' git branch -M main git config user.email "YOUR_MAIL_ADDRESSS" git config user.name"YOUR_NAME" git push origin main
After executing all of the commands, you will see your project has been uploaded successfully to Github.