Introduction to Git

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

What are some of the disadvantages of CVCS?

- If that server goes down for an hour, then during that hour nobody can collaborate at all or save versioned changes to anything they're working on. - if the hard disk the central database is on becomes corrupted, and proper backups haven't been kept, you lose absolutely everything

If you are offline or off VPN, how does Git differ from other systems in the ability to get work done?

- With Git, there is very little you can't do if you're offline or off VPN. You can commit to your local copy until you get to a network connection to upload. - In many other systems, doing so is either impossible or painful.

What are some of the advantages of CVCS over local VCS?

- everyone knows to a certain degree what everyone else on the project is doing - administrators have fine-grained control over who can do what - it's far easier to administer a CVCS than it is to deal with local databases on every client.

Because Everything in Git is checksummed before it is stored and is then referred to by that checksum, this means what two things?

- it's impossible to change the contents of any file or directory without Git knowing about it. - You can't lose information in transit or get file corruption without Git being able to detect it.

How do other systems "think" about information and what is this commonly describe as?

- think of the information they store as a set of files and the changes made to each file over time - delta-based version control

Describe The basic Git workflow in 7 steps

1 Create local branch 2 Write some commits within local branch 3 Push to Github 4 Create Pull Request explaining changes that branch contains 5 Merge to master 6 Pull down new master commits locally 7 Repeat

Describe The basic Git workflow in 3 steps

1. You modify files in your working tree. 2. You selectively stage just those changes you want to be part of your next commit, which adds only those changes to the staging area. 3. You do a commit, which takes the files as they are in the staging area and stores that snapshot permanently to your Git directory.

What are the differences between Git and a text editor in terms of what they save and their record keeping?

A text editor can only make and save changes to a file. Git tracks changes to the files and their contents over time.

Name 3 Centralized Version Control Systems

CVS, Subversion, and Perforce

Explain how Git using local files and resources to operate, compared to other systems needing information from another computer on your network, is useful when you want to browse the history of the project.

Git doesn't need to go out to the server to get the history and display it for you — it simply reads it directly from your local database. most operations seem almost instantaneous.

What is the difference between git and github

Git is a program you install , used in the command line, which allows you to annotate the changes you make to create an easily navigable system history. while GitHub is a website that takes that lovely commit history and hosts it online so that you can access it from any computer.

What kind of program is Git?

Git is a version control program.

what is Git officially and what does it do?

Git is a version control system. Git records differences in the files and folders AND keeps a historical record of each save.

what is Git like?

Git is like a really epic save button for your files and directories

Why is Git useful for an individual developer?

Git is useful for creating snapshots of your work. If you realize halfway through that you've messed up, it's much easier to reset.

Does Git work at a local or remote level?

Git works on a local level. Any changes you make are saved locally with Git.

Name 4 Distributed Version Control Systems

Git, Mercurial, Bazaar or Darcs

Does GitHub work at a local or remote level?

GitHub works on a remote level. You must push your local changes (using Git) to Github.

The mechanism that Git uses for this checksumming is called a ___

SHA-1 hash

what is copied when you clone a repository from another computer?

The Git directory

checksum

a digit representing the sum of the correct digits in a piece of stored or transmitted digital data, against which later comparisons can be made to detect errors in the data.

The working tree/directory

a single checkout of one version of the project. These files are pulled out of the compressed database in the Git directory and placed on disk for you to use or modify.

Define Version control

a system that records changes to a file or set of files over time so that you can recall specific versions later.

How do Distributed Version Control Systems solve the issues make up for the disadvantages of CVCS?

clients don't just check out the latest snapshot of the files; rather, they fully mirror the repository, including its full history. Thus, if any server dies, and these systems were collaborating via that server, any of the client repositories can be copied back up to the server to restore it. Every clone is really a full backup of all the data.

What is GitHub?

is a remote storage facility on the web for all your coding projects

Modified

means that you have changed the file but have not committed it to your database yet Or if it was changed since it was checked out but has not been staged

The Git directory is where Git stores the ___ and ___ for your project.

metadata object database

the command line is the ___ place you can run all Git commands

only

Once connected to a network, what does Git allow you to do?

push your project to GitHub for sharing and collaborating with other developers.

Centralized Version Control Systems

systems that have a single server that contains all the versioned files, and a number of clients that check out files from that central place.

what are the three main sections of a Git project

the Git directory (repository), the working tree (working directory), and the staging area (the index).

What need do Centralized Version Control Systems fill?

the need to collaborate with developers on other systems

Why is Git/GitHub useful for a team of developers?

Git and GitHub are useful for teams because they can merge code together. A developer can work on one part of the code while a second developer works on another part. They can then use Git/GitHub to easily combine their changes.

If you want to see the changes introduced between the current version of a file and the file a month ago, how does Git differ from other systems in this situation?

Git can look up the file a month ago and do a local difference calculation, instead of having to either ask a remote server to do it or pull an older version of the file from the remote server to do it locally.

Describe a SHA-1 hash

This is a 40-character string composed of hexadecimal characters (0-9 and a-f) Example: 24b9da6552252987aa493b52f8696cd6d3b00373

What terms are used to describe how the user and GitHub transfer information between itself and other computers?

This is done via pushing commits from your local machine up to Github, and then, from the new/different computer pulling those commits down.

Pull Request

a Github feature that allows her to explain the changes that her branch makes to the master branch

local version control system

a common but very error prone method where you copy files into another directory (perhaps a time-stamped directory, if you're clever).

the staging area (the index)

a file, generally contained in your Git directory, that stores information about what will go into your next commit.

a good rule of thumb is that the minute something is working the way you want it to...

commit it, before you try to edit it or experiment with a different approach. There's no harm in committing small chunks of work very frequently, and in fact, many engineers pride themselves on that doing exactly that.

Name the three main states in Git that your files can reside in

committed, modified, and staged

How does Git stores and "think" about information?

like a stream of snapshots. Git basically takes a picture of what all your files look like at that moment and stores a reference to that snapshot

Git works on your ___ machine

local

Committed

means that the data is safely stored in your local database, the git directory

Staged

means that you have added modified file in its current version, to the staging area


Kaugnay na mga set ng pag-aaral

Human Anatomy & Physiology Sapling HW4- UNIT ONE

View Set

03.08 Testing Tips - Understanding Complexity

View Set

Chapter 17, Infection Prevention and Control in the Hospital and Home Quiz

View Set

What is this /that? (Classroom objects) He aha tēnei / tēnā / tērā?

View Set

Alverdens geografi s.74-79 Naturgeografiportalen - Vandforurening

View Set