Git is a distributed version control system that tracks changes in computer files. It's primarily used for software development, but can also be applied to other projects that involve managing and tracking changes in files.
Git is built using C.
Git is like a digital backpack for your projects(Files). It stores all your files, changes, and versions, allowing you to carry them around and access them whenever you need. Inside your backpack is a magical compartment.
Version Control - Keeps track of changes.
Git was created by Linus Torvalds in 2005. It was originally designed to manage the development of the Linux kernel, but it quickly gained popularity and became a widely used version control system.
The name "Git" is derived from the word "Linus," a reference to its creator, Linus Torvalds, who is also the creator of the Linux operating system.
All the files are cloned.
Experimenting is easier. You can rectify your past. It is like going back in time and making changes on it.
Navigate to your project directory in the terminal.
git init
Add your changes to the staging area:
git add .
Commit the changes to your local repository:
git commit -m "Your commit message"
Create a new repository on GitHub.
Add the remote repository to your local repository:
git remote add origin https://github.com/your-username/your-repository.git
Push your local commits to the remote repository:
git push -u origin "branch-name"
Clone the remote repository to your local machine:
git clone https://github.com/your-username/your-repository.git
Pull the remote repository to your local machine:
git pull https://github.com/your-username/your-repository.git "branch-name"