Concept of Git Flashcards
Git
Git is a version control system (VCS) that allows developers to track changes to source code and work (collaborate) on the project as a team
Main components of git
Repository
Commit
Branch
Tag
Merge
Repository
is a place where all files and history of changes of a project is stored
Commit
Fixing changes in a repository
Branch
Separate line of code that can be created to work on specific functionality or fix bugs
Tag
A label that marks specific commit as important or release version
Git flow
Methodology for working with git. It defines a standard of rules and branches for their use e.g. master, develop, feature, hotfix, release. The methodology streamline project work and enable more effective team collaboration.
Master
stores the stable version of the project
Develop
stores the current version of the project that the developer is working on
What is a working copy in git
A working copy in git is a local copy of a repository on the developer’s computer. It contains project files and a history of changes. It doesn’t affect the repository itself until changes are committed
Service directory (index)
This is the intermediate between the working copy and the repository.
This is where changes are tracked before committing.
Files needed in the next commit are added, files not needed are deleted.
Git init
creating a new repository
Git clone
cloning an existing repository on the computer
Git add
add files to the service directory
Git commit
fixing changes to the repository