Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save dipak-wagh/16a04c8d8527a8e297440777d4323b6c to your computer and use it in GitHub Desktop.

Select an option

Save dipak-wagh/16a04c8d8527a8e297440777d4323b6c to your computer and use it in GitHub Desktop.
Push your project to GitHub to store, manage, and share your code with version control.
//Steps
Create a new repository on GitHub. Do not initialize it with a README.
Open your terminal or Git Bash.
Navigate to your project folder using cd path/to/your/project.
Run git init to initialize Git in the project folder.
Run git add . to stage all files for commit.
Run git commit -m "Initial commit" to commit the files.
Run git remote add origin https://github.com/your-username/your-repo-name.git to link your local project to the GitHub repo (replace the URL with your repo’s URL).
Run git push -u origin master to push your code. If that doesn’t work, run git push -u origin main.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment