how to use Git at your early stage
- Create a github account.
- Create a repository in github.
- Copy the url of the repository from github.
- Click clone the repository in vscode.
- Paste the copied link of repository in vscode.
- The cloned file should be saved in certain location.
- Repository created successfully.
- Open terminal.
- Now we add this modified file in the repository using the comment "git add .\README.md".
- Now we check the status using comment "git status".
- Now we use the comment "git commit -m " to complete the file changes.
- Now we publish the file with "git push origin main".
- To load the modified changes from other user, use "git pull origin main".
- To add a new branch, we need to use "git checkout -b branch_name".
- To check available branch, we need to use "git branch".
- To change branch, we need to use "git checkout main".
- To merge the new branch, we need to click the link which appeared after pushing into new branch.
- Now we get a push request at github, we confirm the request and merge into the main branch.