Domain 1: Intro to GitHub - Deck 4 Flashcards
A file’s changes are not recorded
untracked
A file’s changes are recorded
tracked
A stage where the changes to files are ready to be committed
staged files
A tool similar to VCS to store source code
Source Control Management (SCM)
A command that can detect that there were changes made to the file and will do its best to apply the changes
patch
A patch in Git is a file that contains a set of changes (diffs) between two versions of a repository. Patches are useful for sharing changes without using a central repository or for applying changes from one branch or repository to another.
A stage where changes have been made to a file, but the have not been stored or committed
modified files
A file maintained by Git that contains all the information about what files and changes are going to go into the next commit
git staging area
A log that displays commit messages
git log
A database for a Git project that stores the changes and the change history
Git directory
A configuration file that specifies the mappings between IP addresses and host names in your network
dns zone file
A command to find the differences between two files
diff
A stage where the changes made to files are safely stored in a snapshot in the Git directory
commit files
A command to make edits to multiple files and treat that collection of edits as a single change
commit
Git Directory vs. Working Tree vs. Staging Area
- Git directory: contains the history of all the files and changes
- Working tree: contains the current state of the project, including any changes that we’ve made
- Staging Area: contains the changes that have been marked to be included in the next commit
- When committing new files or changes with git commit, the user is asked to provide a commit message because you cannot commit with an empty commit message
Describe important aspects of git
- VCS created in 2005 by Linus Torvalds (he started the Linux kernel)
- Free open source system available for installation
- Every person can contribute to a repository has a full copy of repository on their own development machine
- Can work as a standalone program as a server and as a client
Explain what a VCS version control system is
- Automates the process of version control, tracks changes to a file or set of files over time so that you do not have to manage file versions manually or with custom automation script, keeps a complete history of your code and other files, allowing you to return to a previous version if needed. Example: Git and GitHub
- Git helps us keep track of our changes and also how we can use it to collaborate with others or avert changes
- Commit: can make edits to multiple files and treat that collection of edits as a single change
- Repositories: centralized digital storage that developers use to make and manage changes to an application’s source code
Difference between linear sequence and non-linear commits
linear sequence
commits in 1 branch
non linear commits
commits on different branches
git vs github
- git: installed and maintained on your local system (rather than the cloud)
- github: repository hosting service
exclusively cloud based
can share your code with others
Command to addto add a new remote
git remote
Command to send local updates to a remote
git push
Command to retrieve updates from a remote
git fetch
Commandto get remote updates into your local repository.
git pull