A personal repository dedicated to learning and practicing Git commands and workflows. This repository will contain various exercises, projects, and notes aimed at mastering version control with Git.
gh repo create Learning-Git --private --source=. --remote=originThis command uses the GitHub CLI (gh) to create a new private repository named Learning-Git on GitHub. It uses the current directory (.) as the source for the new repository and sets up a remote named origin. The repository is available at: https://github.com/madhurimarawat/Learning-Git.
mkdir Learning-GitCreates a new directory named Learning-Git. This will be the local folder where the Git repository will be initialized.
cd Learning-GitChanges the current working directory to Learning-Git, so you are inside the folder you just created.
git remote add origin https://github.com/username/Learning-Git.gitAdds a remote repository named origin that points to the URL https://github.com/madhurimarawat/Learning-Git.git. This remote repository will be the location where you can push and pull changes.
git branch -M mainRenames the current branch to main. The -M option forces the renaming even if a branch named main already exists.
git push -u origin mainPushes the main branch to the remote repository origin. The -u option sets this remote branch as the default upstream branch for future push and pull commands.
git remote add origin https://github.com/madhurimarawat/Learning-Git.gitAttempts to add another remote repository named origin pointing to https://github.com/madhurimarawat/Learning-Git.git. However, this would result in an error if a remote named origin already exists.
The correct repository link is: https://github.com/madhurimarawat/Learning-Git
The folder name for this project should be Learning-Git.
-
Drop a 🌟 if you find this repository useful.
-
If you have any doubts or suggestions, feel free to reach: Â
 Â
-
Questions or feedback?
 Feel free to open an issue or connect via GitHub Discussions. I'm happy to help!
