• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 12 pages
Exam (elaborations)

Github Study Guide With Complete Solution

Document preview thumbnail
Preview 2 out of 12 pages

Github Study Guide With Complete Solution...

Content preview

Github Study Guide With
Complete Solution

Git vs Github - ANSWER Git is a Distributed Version Control System that
helps to track the changes in the source code. Git is simply a persistent hash
map wherein key is the hash of file and the value is the contents of the file.
Github is used to manage the remote repository. If you wanna use Git you
must install in your local machine.

cat command - ANSWER Allows us to create to create single or multiple files,
view contain of file, and concatenate files and redirect output in terminal or
files

nano - ANSWER edit the file using this shell command

what does git init do? - ANSWER creates the git repository and places the
hidden .git folder within the git repository

how to view hidden folders in finder - ANSWER command + shift + .

what are the four object types in git - ANSWER Blob, tree, commit, annotated
tag

what is blob - ANSWER It is an object type for git. Binary large object => Its
the object type used to store contents of each file in a repository (file data)

tree - ANSWER It's an object type for git. It stores information about
directories. In other words, it's just like a directory - it references bunch of
other trees and/or blobs, i.e. files and sub-directories

, commit - ANSWER Its an object type that allows to store different versions of
the project

annotated tag - ANSWER object type, which is a persistent pointer that
points to different commits

What does a hash function do? - ANSWER Generates a fixed length hash
based on the input. Same input will have the same hash. One way function.
Cannot get input based off hash. Only hash based off input

git hash-object - ANSWER allows us to create a new blob object type

sha1 bit size? - ANSWER 160 bits

how to create hash from string in command line ANSWER echo "Hello Git" |
shasum

what is the probability of reaching a specific hash given a file ANSWER
1/(2^160) => There are 2^160 possible options for SHA1 (160 bits)

git cat-file options ANSWER - git cat-file -p <hash> => contents of the
object

- git cat file -s <hash> => size of the object

- git cat file -t <hash> =>type of the object

how to git the hash of the a file or object using pipe - ANSWER echo "Hello,
Git" | git hash-object --stdin -w

--stdin => take input from standard input

- w => create git object

how would you write a string to a new file - ANSWER echo "Hello Git" >

Document information

Uploaded on
October 27, 2024
Number of pages
12
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$11.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Smooth
4.1
(67)
Sold
353
Followers
216
Items
3029
Last sold
1 month ago




Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions