• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/30

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

30 Cards in this Set

  • Front
  • Back

What two commands must be entered before a local GIT repo can be configured on your PC?

"git config --global user.name "Something" and "git config --global user.email "SomethingElse"

What command initializes a folder or directory to turn into a GIT Repository?

"git init"

What command will show you your repository configuration files / users?

"git config --list"

Why are username and user email required?

To track who is making "commit" changes to the Repository as part of the version control

What is a Public GIT Repository that you can clone to your local PC, or push your local repo out to it?

Github.com

While in your Local Repo, what GIT command allows you to view the files from Bash?

"dir"

What are the benefits of Version Control?

Collaboration, safety of data, being able to work on your code at any PC if your Repo is hosted in a Public Repo like Github

What does it mean to "stage" a file? What command stages a file? What command stages all unstaged files?

Staging files tells GIT they are ready for a "commit" to the Repository, "git add filename.txt" for a specific file or "git add ." to stage all untracked files in the Repository

What is an Untracked file?

A file that is in your repository that GIT is not actively tracking, it has not yet been staged and then commit to the GIT Repo, you may not want to track files such as test files

What is required to make a "commit"?

A commit message indicating what update you are doing a commit on the repo for, these should be as descriptive as possible

What is the command to commit a file?

"git commit -m "My first commit!""

What is a GIT "commit"?

It is a snapshot of your entire GIT repository at that moment in time, so it doesn't just add the staged files, it will also commit changes made to other files in the repo since the last commit

How do you see your GIT repository timeline in short form and verbose form?

"git log --oneline" shows brief description, "git log" shows a verbose output of commit history

What is a GIT Head?

It will be at the most recent commit by default, this is where you are in the "timeline" of your repository, the head can be moved to different points in time / different branches

What are GIT Branches?

The Master Branch is the root / main Branch in your GIT timeline that you want to essentially merge other branches into, while you can change to a non-Master branch to work on a completely new / clean GIT timeline

What command changes to a new branch?

"git checkout (branch)" will create a new branch if not in existence, this will branch off of your main branch

How do you get back to your Master Branch once you change to a different branch?

"git checkout master"

How do you see the status of your GIT Repo in terms of where your Head is / What files are Untracked or Staged?

"git status"

What commands allows you to configure a remote repo to push your local repo to, and the command to then push your repo?

"git remote add origin (github repo addy)" to configure the remote repo, then "git push -u origin master"

How do you pull clone a Github Repo to work on locally on a fresh machine?

"git clone (github repo addy)" will add that repo inside the folder / directory you are currently in

What is GIT Porcelain vs GIT Plumbing?

GIT Porcelain refers to the level of knowledge of GIT that the DEVASC requires, GIT Plumbing refers to a very high skill level of GIT

In what situations can you make a commit with leaving a message?

Never. Every commit needs a message!

How do you move to different points in time in your GIT repo timeline?

"git log --online" will show commits with a 7 digit alpha numeric # that you can "git checkout 1237f84d" to move the Head to that point in time

What is Headless in GIT?

When you move your head to a previous point in time, leaving the most recent commit without a head, any commits from here will start saving off the main branch onto a limbo like timeline

Why would you ever move the GIT Head / put yourself into a Headless Mode?

If a file or program breaks after recent commits, you can go back to points in time to see what files looked like previous to the commits that then seemed to break things

How do you GIT out of Headless mode back to the main branch at the current point in time?

"git checkout master"

When would your Master Branch say "Main" rather than "Master"?

When you clone a repo from GitHub, the Master Branch is technically on GitHub, and your Master Branch is called "Main" instead

What is the difference between a "Main" branch and a "Master" branch?

A Main branch would need to be merged back into the Master on GitHub for your changes to be saved to the main Repository, however you must ensure noone else makes a commit first or you will run into Merge conflicts

What is a Merge Conflict?

When two GIT timelines / branches have commit points that are out of sync, and GIT cannot dynamically figure out how to merge the branch differences together, you need to manually fix the files or revert back to a previous commit point in time and lose some work

How do you fix a GIT Merge Conflict?

Carefully :)