GitHub
GitHub is a popular online platform that hosts and manages software development projects using Git, a version control system. It provides a collaborative environment for developers to work together on projects, track changes, and collaborate on code.
Creating an account on Github
Go to GitHub and sign up for an account:
or
If you already have an account login your github into browser and create a repository, we have already set up a local Git repo, we are going to push that to GitHub:
Note: Remember to use the same e-mail address you used in the Git config.
Creating a repo in github
You have made a GitHub account, sign in, and create a new Repo:
Enter name of the repository
Push Local Repository to GitHub
Copy the URL, or click the clipboard marked in the image above.
Now paste it the following command:
git remote add origin (link copied above)
git remote add origin url specifies that specifies that you are adding a remote repository, with the specified URL, as an origin to your local Git repo.
Now we are going to push our master branch to the origin url, and set it as the default remote branch:
git push –set-upstream origin master
Note: Since this is the first time you are connecting to GitHub, you have to connect your github account to git using personal access token, which you would create in github.
After this command you need to refresh your github page and you will see your files you created in git inside your git repo.