|
| 1 | +--- |
| 2 | +title: 'Introduction' |
| 3 | +teaching: 10 |
| 4 | +exercises: 2 |
| 5 | +--- |
| 6 | + |
| 7 | +:::::::::::::::::::::::::::::::::::::: questions |
| 8 | + |
| 9 | +- What are the goals of this course? |
| 10 | + |
| 11 | +:::::::::::::::::::::::::::::::::::::::::::::::: |
| 12 | + |
| 13 | +::::::::::::::::::::::::::::::::::::: objectives |
| 14 | + |
| 15 | +- To understand the learning outcomees of this course |
| 16 | +- To understand the structure of the practicals |
| 17 | + |
| 18 | +:::::::::::::::::::::::::::::::::::::::::::::::: |
| 19 | + |
| 20 | +# What is Version Control? |
| 21 | + |
| 22 | +Any means by which you track changes to something: |
| 23 | + |
| 24 | +{alt="Four Python files named: |
| 26 | +work.py, work_final.py, work_final_2.py, work_final_2_really_final.py"} |
| 27 | + |
| 28 | +## What is Version Control? |
| 29 | + |
| 30 | +- Structured way of keeping track of changes to files |
| 31 | +- Implemented in different \"version control systems\" (VCS) |
| 32 | +- Typically share the concept of a history, the changes which make up the history , and the ability to move freely back and forth within the history |
| 33 | +- The most popular VCS is git , which we will be focusing on today |
| 34 | + |
| 35 | +## Why Version Control? |
| 36 | + |
| 37 | +- Keeps a labelled history of all changes made to a project, and lets you rewind them if something goes wrong |
| 38 | +- Lets you experiment with changes to a project whilst keeping stable versions of the project untouched |
| 39 | +- Provides lots of convenience features for working with other people on a project |
| 40 | +- Can act as a backup of your projects, especially when using a hosted service like GitHub |
| 41 | +- Many tools (like IDEs) have git integrations |
| 42 | + |
| 43 | +## What is git? |
| 44 | + |
| 45 | +- A specific version control system, created by the guy who created the Linux kernel (the myth goes that he named it by his personal reputation) |
| 46 | +- A \"distributed\" version control system - many people can have copies of the stuff under version control and they don't need to all be in sync |
| 47 | +- One of the most important programming tools you can benefit from becoming comfortable with |
| 48 | + |
| 49 | +{alt="Git logo"} |
| 50 | + |
| 51 | +## What is GitHub? |
| 52 | + |
| 53 | +- A service for hosting, organising, and collaborating on projects that are under version control |
| 54 | + |
| 55 | +<!-- --> |
| 56 | + |
| 57 | +- Other git services are available |
| 58 | + |
| 59 | +<!-- --> |
| 60 | + |
| 61 | +- Provides a consistent way to store and share version-controlled projects |
| 62 | +- Can act as a portfolio of sorts |
| 63 | +- Has a whole host of other features (project management, continuous integration, etc.) |
| 64 | +- See the PlasmaFAIR GitHub organisation for an example |
| 65 | + |
| 66 | +{alt="GitHub logo"} |
| 67 | + |
| 68 | +## Git Glossary: Basics |
| 69 | + |
| 70 | +- Repository (repo) : a project under version control |
| 71 | +- History : timeline of changes to your repo |
| 72 | +- Clone : make a local copy of a repo, including its history |
| 73 | +- Commit : a labelled set of specific change to files in your repo |
| 74 | +- Push / pull : synchronise history with another copy of your repo |
| 75 | +- Working tree : the current state of your project and files on disk |
| 76 | +- Track : keep under version control |
0 commit comments