Git is a version control system. Its original purpose was to help groups of developers work collaboratively on big software projects. Git manages the evolution of a set of files – called a repository – in a sane, highly structured way.
Understanding GitHub isn't complicated, I think! But at first, we have to understand Git. Well, Git is an open-source version control system that was started by Linus Torvalds—the same person who created Linux.
Version control system means for example when developers create something such as an app, they frequently change the code and releasing new versions up to and after the first official (non-beta) release, this system always keeps these revisions straight, storing the modifications in a central repository.
By this developers can easily collaborate, can download the beta version also can make changes to the code, and tries to upload the newest versions, same as unofficial developers can still download the files and use them.
Coders can share ideas and methods and make awesome software and GitHub brings them together as a team and coding experts onto one collaborative platform. Sounds difficult to hear? Let me explain it in further detail.
GitHub is a code hosting platform for Coders and Non-coders to work together on projects. Anybody can take advantage of Git by GitHub. Without GitHub, using Git generally requires a bit more technical savvy and use of the command line.
Why! GitHub? There are several reasons for that.
It enables slick and easy collaboration with version control. This allows you to work on code with anyone from anywhere. If you plan on getting a job, you’ll look really good if you already know your way around GitHub It allows multiple developers to work on a single project at the same time. It reduces the risk of duplicative or conflicting work and can help decrease production time. With GitHub, developers can build code, track changes, and innovate solutions to problems that might arise during the site development process simultaneously. Non-developers can also use it to create, edit, and update website content, which Carpenter demonstrates in her tutorial.
This site was built using For windows download Git bash from here
git --version
You can check your current version of Git by running the git --version command in a terminal (Linux, macOS) or command prompt (Windows)
user@localhost:~$ git --version
git clone
If you want to get a copy of an existing Git repository — for example, a project you'd like to contribute to — the command you need is git clone
user@localhost:~$ git clone
ls
The ls command lists the current directory contents and by default will not show hidden files
user@localhost:~$ ls
cd DirectoryName
user@localhost:~$ cd new_dir
cd ..
user@localhost:~$ cd ..
git add .
user@localhost:~$ git add .
git commit -m ""
user@localhost:~$ git commit -m "your message"
git push origin BranchName
user@localhost:~$ git push origin main
git status
user@localhost:~$ git status
git log
user@localhost:~$ git log
touch FileName
user@localhost:~$ touch NewFile
rm FileName
user@localhost:~$ rm NewFile
mkdir DirectoryName
user@localhost:~$ mkdir new_dir
rmdir DirectoryName
user@localhost:~$ rm new_dir
git branch
user@localhost:~$ git branch
git branch NewBranchName
user@localhost:~$ git branch seond_branch
git checkout BranchName
user@localhost:~$ git checkout second_branch
git pull origin BranchName
user@localhost:~$ git pull origin second_branch
git merge BranchName
user@localhost:~$ git merge second_branch
Every changes you neeed to three commands
git add .
user@localhost:~$ git add .
git commmit -m " "
user@localhost:~$ git commit -m "your message"
git push origin BranchName
user@localhost:~$ git push origin main
Fork, pull request, and merge – are three features that make GitHub so powerful. If you wanted to contribute to an open-source project you had to manually download the project’s source code, make your changes locally, create a list of changes called a “patch” and then e-mail the patch to the project’s maintainer. The maintainer would then have to evaluate this patch, possibly sent by a total stranger, and decide whether to merge the changes.