Saturday, February 15, 2025
HomeVersion ControlCreate new repository on GitHub

Create new repository on GitHub

Step 1: Create new repository

Step 2: Create repository name and some settings for repository (1, 2 is important)

Quick setup page will show

Note here there are two possibilities

One is your project already has a git link but needs to change to the new repo
Second, your project is completely new

In case your project has an old repo will see the folder.

Open Command Prompt and navigate to the folder then use the following command to check the current git link

git remote -v

Then use this command to change the path you want

git remote set-url origin https://github.com/new-repo-link.git

Then use Git Add. To add changes

git add .

Then use Commit commands to confirm the changes

git commit -m "your commit message"

Use the following command to move to Main fast

git branch -M main

Then push the project to the repo

git push -u origin main

In case your project is completely new, you will follow these

echo "# dpmmba" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/nmcdotnet/dpmmba.git
git push -u origin main

Nguyễn Minh Châu
Nguyễn Minh Châuhttps://nhatkydev.com
Hi guys ! I'm a software developer. I love programming and new technologies. I create non-professional content on this website, you can only view it for reference purposes.
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular