Version control for Programmers
Like Microsoft Word “Track Changes” feature with superpowers
Makes it easy for programmers to collaborate and work on the same codebase
SVN (subversion) and CVS are other version control programs (Git is the most popular)
Web-based Git repository hosting service
Built on top of git
Home to +90% of all open source projects
Morphed into a “social network” for developers
Most basic element of GitHub
A repository can be referred to as a projeect
contains all of a project’s files
Stores each file’s revision history
Repositories can have multiple collaborators and can be either public or private.
A “revision”, is an individual change to a file (or set of files)
Git’s version of “saving”
Commits save a “snapshot” of all of the project’s files at that point in time
Using commits you can “time travel” and navigate back to any previous commit that was made throughout the history of the project
Commits usually contain a commit message which is a brief description of what changes were made
Parallel version of a repository
Branches allow developers to work on new features without affecting the “master” branch and disrupting the “live” version
The process of creating a separate branch to work on a feature is referred to as “creating a feature branch“
After developers have added their new feature (on their feature branch) they will then make a Pull Request (which is a request for comments and a request to Merge their changes back into the main branch (master branch))
The default branch found in every Git respository
For most companies, the master branch reflects that latest version of production code (i.e. working code available to customers)
Merging takes the changes from one branch (in the same repository or from a fork), and applies them into another
This often happens as a Pull Request (which can be thought of as a request for comments and a request to merge into the another branch - usually the master branch)
Refers to sending your committed changes to a remote repository such as GitHub.com
For instance, if you change something locally, you’d want to then push those changes so that others may access them
A fork is a copy of a repository. Forking a repository allows you to freely experiment with changes without affecting the original project
Most commonly, forks are used to either propose changes to someone else’s project or to use someone else’s project as a starting point for your own idea
Copies a remote repository (i.e. repository in the cloud on a platform like Github.com) and creates a local copy of the repository on your computer
Cloning creates a link between the the remote and local copy of a repository, allowing you to your code in sync between the two
Pull requests are proposed changes to a repository submitted by a user and accepted or rejected by a repository’s collaborators (i.e. team members).
Pull requests can be thought of as a developer asking for permission to merge their changes into the master branch
Pull requests each have their own discussion forum, where developer can discuss the changes requested and suggest further revisions.
This discussion as also referred to as Code Reviews
Great resource for all things git can be found here