Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/madhurimarawat/learning-git
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.
https://github.com/madhurimarawat/learning-git
beginner beginner-friendly documentation git github-cli learning-by-book learning-material python website
Last synced: about 2 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/madhurimarawat/learning-git
- Owner: madhurimarawat
- License: other
- Created: 2024-08-20T07:54:24.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-10-24T14:29:51.000Z (3 months ago)
- Last Synced: 2024-10-25T18:20:18.776Z (3 months ago)
- Topics: beginner, beginner-friendly, documentation, git, github-cli, learning-by-book, learning-material, python, website
- Language: Python
- Homepage: https://madhurimarawat.github.io/Semester-Notes/Git-Commands.html
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Learning-Git
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.
---
### Command Descriptions for Setting Up a Git Repository
#### GitHub CLI Command
```bash
gh repo create Learning-Git --private --source=. --remote=origin
```This 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.
## Git and Directory Setup Commands
```bash
mkdir Learning-Git
```Creates a new directory named `Learning-Git`. This will be the local folder where the Git repository will be initialized.
```bash
cd Learning-Git
```Changes the current working directory to `Learning-Git`, so you are inside the folder you just created.
```bash
git remote add origin https://github.com/username/Learning-Git.git
```Adds 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.
```bash
git branch -M main
```Renames the current branch to `main`. The `-M` option forces the renaming even if a branch named `main` already exists.
```bash
git push -u origin main
```Pushes 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.
```bash
git remote add origin https://github.com/madhurimarawat/Learning-Git.git
```Attempts 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.
#### Note
The correct repository link is: https://github.com/madhurimarawat/Learning-GitThe folder name for this project should be `Learning-Git`.
---
## 📬 Stay Connected
- Drop a 🌟 if you find this repository useful.
- If you have any doubts or suggestions, feel free to reach: Â [![Linkedin Badge](https://img.shields.io/badge/-madhurima-blue?style=flat&logo=Linkedin&logoColor=white)](https://www.linkedin.com/in/madhurima-rawat/) Â Â
- **Questions or feedback?**
 Feel free to open an [issue](https://github.com/madhurimarawat/Learning-Git/issues) or connect via [GitHub Discussions](https://github.com/madhurimarawat/Learning-Git/discussions). I'm happy to help!