Introduction to Git

Introduction to Git





Today marks the beginning of my journey into the world of Git and GitHub through Microsoft's comprehensive learning path. It's been an engaging and hands-on experience, offering a promising start to this educational endeavor.

Within this module, we are set to explore the following key areas in depth:

In this module, you'll:

  • Learn what version control is
  • Understand distributed version control systems, like Git
  • Exercise


1. What is version control?

- Version control is a system that allows you to track and manage changes to your files and projects over time

- It keeps a detailed history of every change made, including who made the change, what was changed, and when it was changed. This historical tracking helps you understand the evolution of your project.

2. What are distributed version control systems, like Git?

- In a distributed system, every user has a complete copy of the repository, including the entire history. This decentralization allows users to work independently and offline, promoting collaboration and flexibility.

- Distributed systems offer enhanced redundancy and security since multiple copies of the repository exist across various locations. This redundancy helps protect against data loss and facilitates disaster recovery.


Exercise

Step1: Check Git version

git --version        

Step2:Set Up Git Configuration

git config --global user.name "Your Name"
git config --global user.email "[email protected]"        

Step3: Create a new directory

mkdir <dir_name>        

Step4: Initialize the repo

git init --initial-branch=main
OR
git init -b main        

Step5: check git staus

git status        

So, whether you're a seasoned software developer with a history of Git commits or someone taking your first steps into the world of version control, take a moment to appreciate the remarkable capabilities of Git and the collaborative potential of GitHub. Embrace the world of Git and GitHub, version control mastery, and the thrill of creating exceptional code. Happy coding, and may your Git repositories always reflect your best work!


Varshil Shah

Computer Engineer | Cybersecurity Enthusiast | Linux | Networking | Cloud Computing

1 年

Thanks for posting Gauri Yadav it's great for beginners to understand Git and how to use it??

回复

要查看或添加评论,请登录

社区洞察

其他会员也浏览了