I learned today how to push my html code to Github
1.Install Git: First, ensure that Git is installed on your computer.
2.Set Up GitHub: If you haven't already, create a GitHub account.
3.Initialize Git Repository: In your VSCode, open the folder containing your project.
4.In vscode left side--> accounts ->sign in--> choose github and it will open browser and github login screen , enter username,password--> login-->authorize-->it will redirect to vscode.
5. Then, open the integrated terminal by selecting Terminal
> New Terminal
from the menu, or by using the shortcut Ctrl +
`. In the terminal, run the following command to initialize a Git repository:
\>>>git init - it will initiate git into your folder
\>>>git add . -- it will add all the files into git
\>>>git commit -m "update" - it will commit your git and added a message update
First time I get errors this two
git config --global user.email"you@example.com"
git config --global user.name"Your Name"
To over come this errors
git config --global user.email"your email id" git config --global user.name"username"
Enter your github email and user_name of github account
\>>>git remote add origin "link"
\>link you get in GitHub repository copy and paste it
Push Changes to GitHub: Finally, push your committed changes to GitHub
\>>>git push -u origin master