-
Commit the staged file present in the repository.
-
To update the commit message, run the command “git commit --amend”.
-
A vim editor will appear.
-
To stage the README.md file, we will follow the above task up to the staging file i.e. run the command “git add .”, then “ git status”.
-
We can see that the README.md file is staged.
-
Now, to unstage the file, run the command “git reset HEAD README.md”, then “git status”.
-
Run the command “git push origin main”. ‘origin’ is the remote name and ‘main’ is the branch name.
-
That will push the changes/commits on your local machine to the remote repository.
-
Run the command “git remote -v”.
-
It will show you fetch and push URLs.
-
Open the Git bash.
-
Open your repository in which the file is present to be staged, in the terminal by running the commands “cd <repository name>”, then “dir”.
-
You will see the README.md file present in the repository.
-
Go to ‘Your repository’ in the drop down menu present on the top right corner.
-
Go to the repository which you have to clone.
-
Click on the code icon. A clone menu will appear.
-
Click on ‘SSH’ option.