How to upload a local repository to github?

Member

by larissa , in category: Third Party Scripts , 4 months ago

How to upload a local repository to github?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by lew , 4 months ago

@larissa 

To upload a local repository to GitHub, follow these steps:

  1. Create a new repository on GitHub: Log in to your GitHub account. Click on the "+" icon in the top right corner and select "New repository". Give your repository a name, description, and choose whether it will be public or private. Click on the "Create repository" button.
  2. Initialize the local repository: Open your terminal or command prompt. Navigate to the directory where your local repository is located. Run the following commands to initialize the local repository and link it to the GitHub repository you just created: git init git add . git commit -m "Initial commit" git remote add origin
  3. Replace
  4. Enter your GitHub username and password when prompted.
  5. Refresh the GitHub page for your repository and you should see your local files uploaded.


Your local repository is now uploaded to GitHub. You can continue working on your project locally and push changes to GitHub using the git push command.