Steps to Add local Project to github

1. Create a new repository on GitHub.

In Terminal, change the current working directory to your local project.
(You can open Git bash CLI )

2. Initialize the local directory as a Git repository.

git init
3. Add the files to your new local repository

git add .

4. Commit the files that you have staged in your local repository.

git commit -m 'commit message'

5. Copy the remote repository URL field from your GitHub repository

For eg: https://github.com/vthangar0202/springboot_jpa_h2.git
6. In Terminal, add the URL for the remote repository where your local repository will be pushed.

git remote add origin <remote repository URL>

7. Sets the new remote

git remote -v
8. Push the changes in your local repository to GitHub. (You have to give git hub login credentials)

git push origin master

Comments

Popular posts from this blog

Java Design Patterns