??Git & GitHub Fundamental
Subhojyoti Das
DevOps Engineer || AWS Certified Cloud Practitioner || Docker || Kubernetes || Container CI-CD || Terraform || Linux || AWS || Jenkins || Git & Github || Electrical Engineer || Wildlife Photographer ||
?What is Git?
? Git(Global Information Tracker) is a distributed version control system (DVCS) that is widely used in software development to track and manage changes to source code and other text-based files. It was created by Linus Torvalds in 2005 and has since become one of the most popular version control systems in the world.
Git is used not only for software development but also for version control and collaboration in other text-based file projects, such as documentation, configuration files, and more. It has become an integral part of modern software development, enabling teams to work together efficiently, track changes, and manage codebases of any size. It's commonly used in conjunction with platforms like GitHub, GitLab, and Bitbucket for hosting and collaborating on Git repositories.
?What is Version control?
? Version control in Git tracks changes in code, allowing multiple collaborators to work on a project simultaneously. It records each modification, enables branching for parallel development, and facilitates easy collaboration, ensuring a history of changes and the ability to revert to previous states. There are two types of VCS-
?Stages of Version Control-
?
?What is a Repository?
? A Git repository is a storage location for a project's files and version history. It contains the entire project history, multiple branches for parallel development, and metadata. Users can clone repositories for collaboration, track changes, and maintain a complete history of their project. There are also two types of repositories-
?What is GitHub?
? GitHub is a web-based platform for version control and collaboration that is built around the Git version control system. It provides tools and services for software developers, teams, and organizations to host, manage, and collaborate on software development projects. GitHub is one of the most popular and widely used code hosting platforms, and it offers a wide range of features to streamline the development and sharing of code.
?Some important Git commands-
?
??git init: Initialize a new Git repository.
??git clone <repository-url>: Clone a repository from a URL.
??git add <file>: Stage changes for commit.git commit -m "message": Commit staged changes with a message.
??git status: View the status of changes.
??git commit -m "message": Commit staged changes with a message.
??git status: View the status of changes.
??git rm: Remove file from staging to untrack.
??git restore: Restoring the deleted file.