You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Git repositories such as this one are usually divided into branches. You can probably guess what a branch is from the name - it's a splitting off of the code along another path. To use a gaming analogy, different branches can be thought of as different play throughs of the same game. Of course we can go back to an earlier saved game and start a new branch from there, maybe going a completely different direction. The big difference is that diverging Git branches can be merged together again later, but we'll talk about that later.
Git branches allow us to do a few useful things which you can probably guess a few of. They allow us to:
Test out different approaches to a problem
Work on separate issues without them causing conflicts
Allow us to do some exploration and try out "what ifs"
If you look on the main page of this repository, you should see that you are currently viewing the 'main' branch of the repository. The main page is where we usually put "finished work".
You are now going to create your own branch. Click on the button highlighted in the previous image and click 'view all branches' which should lead you to a new page. On this new page, click 'New Branch'. In the 'New branch name' field, enter something like your name (it doesn't matter what you call it as long as you remember).
Under Source, make sure you select the 'Homework' branch, then select 'Create new branch'.
Congratulations! You've just created your own branch in a Git project! In the next project we will load the branch into a codespace and actually do some coding.
The text was updated successfully, but these errors were encountered:
Git repositories such as this one are usually divided into branches. You can probably guess what a branch is from the name - it's a splitting off of the code along another path. To use a gaming analogy, different branches can be thought of as different play throughs of the same game. Of course we can go back to an earlier saved game and start a new branch from there, maybe going a completely different direction. The big difference is that diverging Git branches can be merged together again later, but we'll talk about that later.
Git branches allow us to do a few useful things which you can probably guess a few of. They allow us to:
If you look on the main page of this repository, you should see that you are currently viewing the 'main' branch of the repository. The main page is where we usually put "finished work".
You are now going to create your own branch. Click on the button highlighted in the previous image and click 'view all branches' which should lead you to a new page. On this new page, click 'New Branch'. In the 'New branch name' field, enter something like your name (it doesn't matter what you call it as long as you remember).
Under Source, make sure you select the 'Homework' branch, then select 'Create new branch'.
Congratulations! You've just created your own branch in a Git project! In the next project we will load the branch into a codespace and actually do some coding.
The text was updated successfully, but these errors were encountered: