7. BRANCHES Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

¿WHAT DOES BRANCHES DO?

A

Branches let you create different versions of your code so that you can play around with adding new features, without worrying about messing up what stable.

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

GIT BRANCH COMMAND

A

Branch lets you take a look at all the branches and your repository.

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

GIT CHECKOUT command

A

Usage: git checkout [branch name]

This command is used to switch from one branch to another.

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

GIT SWITCH COMMAND

A

Usage: git-switch - Switch branches
Typically what you want to do is make a copy of an existing branch. You can do that with the git switch command. It’ll have the same history as the current branch.

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

GIT MERGE COMMAND

A

Usage: git merge [branch name]

This command merges the specified branch’s history into the current branch.

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

¿WHAT SHOULD HAPPEN TO THE BRANCH YOU DON’T NEED?

A

So when you’re done with a feature or a fix, it’s a good idea to delete the branch that you no longer need.

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

GIT BRANCH -D COMMAND

A

Usage: git branch -d [branch name]

This command deletes the feature branch.

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

¿WHAT IS GITFLOW?

A

GitFlow is a branching model for Git, created by Vincent Driessen. It has attracted a lot of attention because it is very well suited to collaboration and scaling the development team.

EX: This sequence of doing things is what we call git flow. You create a new branch, that’s usually a feature or a fix branch. You make changes to that branch. Then you merge that branch back to master, and then you delete the old branch.

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

BRANCHING AND COLLABORATION

A

When you collaborate with other people, everyone leaves the main branch alone. You can see that things would get really messy if everybody was trying to work on the same branch. So everybody creates a new branch. Then you make a change and you follow this structure. This will make working with others a lot easier.

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