Save Your Project to Github - koglak/SWE573 GitHub Wiki

Push the project to Github

Create new Git Repository! Check for more information: Git Version Control System

1) You should see git directory in your project directory!

 git init

image

2) Add your all files to stage

git add .

3) Make your first commit!

git commit -m "Initial commit"

4) Connect local project with your Github repository!

A remote repository in Git, also called a remote, is a Git repository that’s hosted on the Internet or another network, such as Github.

The git remote command lets you create, view, and delete connections to other repositories. Below code creates a connection with your github repository.

git remote add origin https://github.com/koglak/SWE573.git

image

5) Push your local project to Github!

The git push command is used to write to a remote repository. "origin" is a shorthand name for the remote repository that a project was originally cloned from. More precisely, it is used instead of that original repository's URL. In other words, The term "git origin master" is used in the context of a remote repository.

git pull origin master --allow-unrelated-histories

GitHub is working on replacing the term "master" on its service with a neutral term like "main" to avoid any unnecessary references to slavery.

git push -u origin main

Now all the files should be visible in github! 🥳

image