stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Git Flashcards | StudBud
Explore
/
Git
Git
17 terms
·
StudBud Administration
·
14 plays
Imported from external platform
Flashcards
17 cards
F
Practice quiz
P
Host live
L
Questions
17
Answers
1
In the code `git add filename` what should filename be?
None of these
Name of the Git repo
File to add to the staging area
File to remove from the working directory
2
The command `git status` shows
Git project's commit history
Untracked files only
Untracked files and the file changes staged for commit
File changes staged for commit
3
Why should you NOT approve and merge your own PRs?
Code should always be reviewed by another dev, to prevent bugs
It's not allowed by GitHub and could risk having account suspended.
There is no danger, go for it!
Merging your own PR will create a duplicate `main` branch
4
Which is the correct GitHub flow?
main -> open PR -> create branch -> make commits -> deploy branch
main -> make commits -> create branch -> open PR -> deploy branch
main -> create branch-> make commits -> open PR -> deploy branch
5
What file extension is typically used for a README file?
.txt
.md
.html
6
Where in Git are project files created, edited, deleted, and organised?
The staging area
The working directory
The .gitignore directory
The initialise folder
7
What makes a good README file?
Detailed doc describing each file in a repo
Introduces project, what languages and tech it uses and how to run the code
A guide that details common errors and debugging tips
A log that records changes and decisions made during development
8
This output is typical of which command?
git log
git status
git add filename
git diff
9
What is the purpose of the staging area?
List notes about the project
Hold file changes for commit
Show a list of project's commits
List files Git should not track
10
With regard to GitHub, why is Markdown important?
It can directly edit code without commits
It is used to squash coding issues and merge branches into `main`
It styles text for better readability of code, issues, pull requests, etc
It produces SHA-1 hashes
11
Why should we open a PR before we deploy a branch?
Don't! Deploy code first and then open a PR
A PR will auto merge your branch into main
A PR allows team to review code before merging a branch
A PR creates a branch off main in order to develop new feature or fix a bug
12
Why use Git?
Test proper syntax in your code
Provide "training wheels" for complex coding concepts
Secure a codebase against hackers
Keep track of changes made to a project over time
13
What does `git init` do?
Delete a Git project
Commit files to the repo
Add all files to staging area
Initialise a new Git project
14
What is Markdown NOT used for?
File with .md or .markdown extensions
Creating code edits to fix issues raised by a PR
Creating headers, emphasis, links, lists, and inline code snippets
Styling code of programming languages with syntax highlighting
15
On GitHub, anything on `main` is always deployable. What does this mean?
code on `main` must be stable and ready for release to production
`main` is where PRs are discussed for deployment
All branches are able to be deployed to production
`main` is the branch where new commits are deployed while in development
16
In Git, a commit
Permanently stores changes from the staging area in the repo
Temporarily stores changes from the staging area in the repo
Saves every file in the working directory
Records only code with correct syntax
17
What is wrong with this? `git commit -m Add new scene to screenplay`
The commit message lacks quotation marks
The "-m" options goes before the word "commit"
The commit message should be in all caps
The "-m" option is not necessary