Git and GitHub are powerful tools that have revolutionized the way we collaborate on projects. If you're a Hindi speaker, you'll be glad to know that there are plenty of resources available to help you understand and use these tools effectively. Let's dive in and explore the world of Git and GitHub in Hindi.

Before we get started, ensure you have Git installed on your system. You can download it from the official Git website (https://git-scm.com/downloads) and follow the Hindi tutorial for installation at (https://www.youtube.com/watch?v=kHAR4aGyLtM).

是什么 Git?
Git is an open-source distributed version control system that helps manage changes to your source code over time. It allows multiple developers to work simultaneously on a project without overwriting each other's code. Git was created by Linus Torvalds in 2005 to handle the development of the Linux kernel.

To start using Git, you'll need to configure it with your name and email address by running the following commands in your terminal:
git config --global user.name "Your Name"git config --global user.email youremail@example.com

如何初始化新 Git 仓库?
Once you've configured Git, you can initialize a new repository with the command git init. This command creates a new hidden folder named .git in your project directory, which stores all of the necessary information about your project.
After initializing the repository, you can start adding your project files using the command git add .. The '.' symbol represents the current directory, so it adds all the files in the current directory. Finally, you can commit your changes with a meaningful commit message:

git add .git commit -m "Commit message"
如何提交更改?
To stage individual files, use git add filename. You can check the status of your files using git status and see your changes with git diff. To push your changes to a remote repository (like GitHub), you'll need to specify the remote name and branch name:

git remote add origin git@github.com:username/repo-name.gitgit push -u origin main
什么是 GitHub?






![[Hindi] Pushing and Pulling Code From Git - Git and GitHub Tutorials for beginners #5](https://i.pinimg.com/originals/4b/71/53/4b71536f3bc1b380f2ceb0caf675f0ea.jpg)












GitHub is a web-based version control and collaboration platform built on Git. It allows developers to host their projects, track changes, and collaborate with other developers. GitHub provides a user-friendly interface for managing projects, issues, pull requests, and code reviews.
To create a GitHub account, visit (https://github.com/) and sign up with your email address. Once you've created an account, you can create a new repository by clicking the "+" icon in the top-right corner and selecting "New repository".
如何连接 GitHub 到本地仓库?
To connect your local repository to GitHub, you'll need to add the remote URL and push your changes:
1. In your project directory: git remote add origin git@github.com:username/repo-name.git
2. Push your local changes to GitHub: git push -u origin main
如何进行协作?
To contribute to someone else's project on GitHub, you can fork (create a copy) of their repository and clone it onto your local machine. Make changes to your local copy of the repository, then create a pull request to submit your changes for review:
- Fork the project: Click the "Fork" button on the project's GitHub page.
- Clone the fork:
git clone https://github.com/your-username/repo-name.git - Make changes and commit:
git add .git commit -m "Commit message"
git push origin main
- Visit the project's GitHub page.
- Click the "Pull requests" tab.
- Click the "New pull request" button.
- Click "Create pull request" after filling out the necessary information.
Finally, keep learning and practicing with Git and GitHub. There are numerous Hindi tutorials and resources available online to help you improve your skills. Don't forget to explore topics such as branching, merging, stashing, rebasing, and more to become a proficient Git user. Happy coding!