diff --git a/README.md b/README.md index 08eab9c..a7fa79b 100644 --- a/README.md +++ b/README.md @@ -1,103 +1,81 @@ # learning_git -A quick introduction to use git efficiently as a beginner -Git Quick Start Guide for Beginners +**Git Quick Start Guide for Beginners** + Welcome to the world of Git, a powerful version control system that helps you track changes to your code, collaborate with others, and manage your projects effectively. This guide is designed to get you started with the basics of Git so that you can begin using it efficiently right away. -Table of Contents -What is Git? -Installing Git -Configuring Git -Creating a New Repository -Cloning a Repository -Adding and Committing Changes -Pushing Changes to a Remote Repository -Pulling Changes from a Remote Repository -Branching and Merging -Additional Resources -What is Git? +**Table of Contents** +* What is Git? +* Installing Git +* Configuring Git +* Creating a New Repository +* Cloning a Repository +* Adding and Committing Changes +* Pushing Changes to a Remote Repository +* Pulling Changes from a Remote Repository +* Branching and Merging +* Additional Resources + + +***What is Git?*** + Git is a distributed version control system that allows you to keep track of changes in your code and collaborate with others. It provides a history of all modifications, making it easy to: + - Undo changes. + - Work on multiple features simultaneously. + - Collaborate with teammates on the same project. + - Manage code in a structured way. + +***Installing Git*** -Undo changes. -Work on multiple features simultaneously. -Collaborate with teammates on the same project. -Manage code in a structured way. -Installing Git Before you can start using Git, you need to install it on your computer. Follow the installation instructions for your operating system: + + Installing Git on Windows + + Installing Git on macOS + + Installing Git on Linux + + +***Configuring Git*** + +After installing Git, set your username and email address to identify your commits. Open a terminal or command prompt and run the following commands, replacing and with your information: `git config --global user.name "Your Name"` +`git config --global user.email "your.email@example.com"` + + +***Creating a New Repository*** -Installing Git on Windows -Installing Git on macOS -Installing Git on Linux -Configuring Git -After installing Git, set your username and email address to identify your commits. Open a terminal or command prompt and run the following commands, replacing and with your information: - -bash -Copy code -git config --global user.name "Your Name" -git config --global user.email "your.email@example.com" -Creating a New Repository To start version controlling a project, create a new Git repository: +1. Navigate to your project's directory. +2. Run the following commands: `git init` + +***Cloning a Repository*** + +If you want to work on an existing Git project, clone it to your computer: `git clone ` #Replace with the URL of the repository you want to clone. + +***Adding and Committing Changes*** + +1. Make changes to your project's files. +2. Stage your changes for commit: `git add .` +3. Commit your changes with a descriptive message: `git commit -m "Your commit message"` + +***Pushing Changes to a Remote Repository*** + +To share your changes with others on a remote Git repository (e.g., GitHub or GitLab): `git push origin ` #Replace with the name of the branch you want to push. + +***Pulling Changes from a Remote Repository*** + +To get the latest changes from a remote repository: `git pull origin ` #Replace with the name of the branch you want to pull. + +***Branching and Merging*** -Navigate to your project's directory. -Run the following commands: -bash -Copy code -git init -Cloning a Repository -If you want to work on an existing Git project, clone it to your computer: - -bash -Copy code -git clone -Replace with the URL of the repository you want to clone. - -Adding and Committing Changes -Make changes to your project's files. -Stage your changes for commit: -bash -Copy code -git add . -Commit your changes with a descriptive message: -bash -Copy code -git commit -m "Your commit message" -Pushing Changes to a Remote Repository -To share your changes with others on a remote Git repository (e.g., GitHub or GitLab): - -bash -Copy code -git push origin -Replace with the name of the branch you want to push. - -Pulling Changes from a Remote Repository -To get the latest changes from a remote repository: - -bash -Copy code -git pull origin -Replace with the name of the branch you want to pull. - -Branching and Merging Branches allow you to work on new features or bug fixes without affecting the main codebase. To create and merge branches: + 1. Create a new branch: `git checkout -b ` + 2. Switch to an existing branch:`'git checkout ` + 3. Merge changes from one branch into another: `git checkout ` `git merge ` + + +**Additional Resources** + +* Git Documentation (https://git-scm.com/doc) +* GitHub Learning Lab (https://lab.github.com/) + +_For more info contact us here: softcreations02@gmail.com_ -Create a new branch: - -bash -Copy code -git checkout -b -Switch to an existing branch: - -bash -Copy code -git checkout -Merge changes from one branch into another: - -bash -Copy code -git checkout -git merge -Additional Resources -Git Documentation -GitHub Learning Lab -Atlassian Git Tutorials -Congratulations! You've completed the Git Quick Start Guide for Beginners. As you continue to work with Git, you'll discover more advanced features and workflows that can help you become a proficient Git user. Happy coding! +:+1: Congratulations! You've completed the Git Quick Start Guide for Beginners. As you continue to work with Git, you'll discover more advanced features and workflows that can help you become a proficient Git user. Happy coding!