2. INSTALLING GIT AND REQUIREMENTS Flashcards

1
Q

GIT CONFIG COMMAND

A

You can use the Git Config command and set up the username as well as the user email. If you already have a GitHub account, you may want to use your GitHub email address here. So you’ll get credit on GitHub as well.
Ej:
git config –global user.name “[name]”
git config –global user.email “[email address]”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

GLOBAL OPTION

A

The global option makes sure that every project in this computer will use the same name and email address.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

GIT INIT COMMAND

A

This command is used to start a new repository.
usage: git init [repository name]

When you initialize Git, it creates an invisible folder called .git in the project folder. Now this is where Git stores all the information about the project.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

¿Git Add command and Staging environment?

A

¿Git Add command and Staging environment?

In order to create an entry that we can go back to. We have to add the files to the staging environment. With the add command, staging is a temporary area that we can store files that we want to commit later on, you use the git add and then specified the file name that you want to move to staging.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

GIT COMMIT COMMAND

A

This command records or snapshots the file permanently in the version history.

Usage: git commit -m “[ Type in the commit message]”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

GIT LOG COMMAND

A

It helps me to verify that Git is keeping track of what we’ve done. You can see the entry that Git has made, which is being tracked.

Usage: git log
This command is used to list the version history for the current branch.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

GIT ENVIROMENTS

A
  • Working
  • Staging
  • Commit
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

FILE STATES

A
  • Tracked (commit)

* Untracked (ex: a new file added since the last commit)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

TRACK FILES STATES

A
  • Unmodified
  • Modified
  • Staged
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

GIT STATUS COMMAND

A

Usage: git status

This command lists all the files that have to be committed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

GIT RESTORE COMMAND

A

Usage: git-restore
Restore working tree files

Issue a git restore command with the file name or use the period to restore your current directory. It’s definitely a lot shorter.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

GIT CHECKOUT PERIOD COMMAND

A

git-checkout - Switch branches or restore working tree files

This command is an older version of the restore command that is still in use.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

¿What is the period for at the commands?

A

It adds everything in the current directoryNow we’re back to where we were a minute ago.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

¿What happens with untracked files and Git?

A

Git isn’t doing anything with untracked files. So if you want to get rid of notes, you would have to delete it manually.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Two of the most important things on Git

A
  • How the different environments work as well as
  • The file states and what each of them does.

This will make it easier to understand what is happening with your project as it gets more complicated.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly