James Finnie-Ansley
James Finnie-Ansley
๐ main.py
๐ main_v1.py
๐ main_v2.py
๐ main_v2Final.py
๐ main_v2FINALFINAL.py
๐ main.py
๐ controls.py
๐ controlsV1.py
๐ CoolControllerV4.py
๐ main_v1.py
๐ main_v2.py
๐ controlsV1_withBrynsEdits.py
๐ CoolControllerV5.py
๐ controlsV1_withBrynsEditsV1.py
๐ main_v2FINALFINAL.py
๐ main_v2FINALFINAL_AlexEdit.py
A distributed version control system that lets you:
If you havenโt already, you will need to:
If you want to use the same code that I use, see this repository: https://github.com/James-Ansley/foobar-example
You need to manage changes to files (code, etc.) over time
Create a Git repository!!
Click "Add"->"Create New Repository"
Fill in the repository name and select the directory you want to create this repository in.
You have made changes to some files and want to record those changes in the repository
Commit the changes!
This is where you can see what has changed since your last commit and select what you want to be in the next commit
This is where you can see what changes have been made within files
This is where you set commit messages and make commits
Your IDE and project have generated files that shouldnโt be committed to the repository
Add a .gitignore
file (See https://gitignore.io)
You (and your team) want to independently work on multiple features at the same time
Create a branch for each feature
Branches allow for multiple independent versions of code to be developed at the same time.
Branches can be merged to bring all the changes from one branch into another.
You are working on a branch with uncommitted changes, but you notice an unrelated bug that needs to be fixed right away
Stash your changes and create a new branch (off of main) to fix the bug
Youโve finished committing changes on your branch and want to add them to the main branch
Merge the branch into main
You have changed and committed the same part of a file on two different branches in two different ways
Resolve the merge conflict in your editor
Merge conflicts happen when the same part of code is changed in different ways on two (or more) branches. In this case, Git doesnโt know how to merge the branches and we need to manually resolve the issue.
<<<<<<< HEAD
This line was changed in one branch
=======
And this same line was also changed in another
>>>>>>> other-branch
butโฆ
You want to be able to work with other people on a project
Host the repository on GitHub
Click "Publish Repository" in the top right
Set the repository name and [optionally] set the visibility to private1
1 As students you should have access to GitHub Pro features
Youโve committed a change on your machine and want it to be visible on GitHub
Push the changes to GitHub
The branch you are working on has changed on GitHub, but you donโt have the changes on your local machine
Fetch and Pull the changes from GitHub
You have finished work on a feature and want team members to review your change before merging it into the main branch
Create a pull request
For this Interactive Activity we will be adding a list of contributors (i.e. you and your team members) to your CS399 GitHub README.md
Clone your CS399 GitHub repository
README.md
file on your main branch (if you donโt have one already)## Contributors
sub-heading to the bottom of the readme workshop_<name>
)Looking for more? Sink your teeth into Git with these books: