What is Git?
What is GitHub?
Navigate: Right/Left Arrows (or Swipe Left/Right)
Zoom Out: Press Esc (or Pinch)
Check out our Coding Classes
What is Git?
- Git was created by Linus Torvalds in 2005 for the development of Linux (a clone of the Unix operating system). Linux and Unix are commonly used to run web servers, and macOS is based on Unix.
- Git is the most commonly used source code management system. (It’s a version control system).
- Git is free open-source software that runs locally on a Mac, PC, etc. to track the changes made to code.
What does Git do?
- Git tracks the changes you (and other developers) make to files.
- Project files and their change history are stored on your computer.
- With a record of what has been done, you can revert back to specific versions should you ever need to.
How does Git track changes?
- Changes are things like adding or deleting code, files, etc.
- Git tracks changes made to code at the character level.
- By looking at what has actually changed inside the file (rather than file modification dates), the changes you make to one line and the changes someone else makes to another line can be successfully merged, keeping both changes.
- The list of changes are stored in a hidden folder at the root level of your project folder.
What is GitHub?
How do we collaborate with Git?
- GitHub is a company that was purchased by Microsoft in 2018.
- GitHub is a place where you can store an online copy of Git repositories, which contain the files and their revision history.
- Having a centrally located place (online) where you can upload your changes and download changes from others, enables you to collaborate with other developers.
How does GitHub work?
- Changes you make are stored in your local repository (repo).
- To share them with other people, you upload (push) your changes to an online repository stored in GitHub.
- Other people can download (pull) those changes and Git will apply those changes to their files. And you can pull the changes made by others and have those changes applied to your files.
- Because Git focuses on the changes, it can upload or download that information very efficiently. It does not need to transfer entire files if they only need to be changed.
Are there alternatives to GitHub?
- Yes! Other companies offer similar services.
- Bitbucket is Atlassian’s version of GitHub, offering a very similar type of service.
- Because Git is open-source software, any company can make an online hosting platform that allows you to upload (push) your changes to it via Git, and download (pull) the changes that other people have uploaded.
How do I use Git?
Command Line vs. Desktop GUI Apps
- Git is software that you access via a command line (terminal).
- Desktop apps (including code editors like Visual Studio Code) provide a GUI (graphical user interface) to use the features of Git.
- Microsoft owns GitHub and makes Visual Studio Code, so it’s not surprising that VS Code integrates nicely with both Git and GitHub.
- On any GitHub repository you can hit the period (.) key and it will load a web version of Visual Studio Code so you can start editing without having to download or install anything!