r/github • • Apr 20 '20

what's the difference between git and github?

272 Upvotes

45 comments sorted by

View all comments

4

u/primaski Apr 20 '20

Git is a local version control system. All changes you've made to your code (that you've committed) are stored in your .git folder on your device itself. You don't need GitHub to use Git. Git will let you restore previous versions of your work, and save new ones - without ever connecting to the Internet. GitHub, on the other hand, is a "Cloud" like service. It stores your Git repository online, which serves as a backup for you, and allows others to clone the git, and commit their own changes to the Git repository - which you can then pull to your local machine. GitHub is one of the most common ways to share your Git repository and collaborate on projects with other people. tl;dr A Git is a locally stored version control system, and a GitHub is an online "hub" for Git repositories (you need a Git repo to upload to GitHub, but you don't need GitHub to have git repos)

2

u/pragyan52yadav Apr 20 '20

Thanks

1

u/primaski Apr 20 '20

Happy to help!!