1. Basics a. source control b. full history of development c. milestones of working software 2. Clone a project/import a project into IDE 3. Tracking changes to files (incl. new files) a. Commit. Pulling before commiting b. Push 4. Working with branches a. Benefits (revert in TDD after going in a wrong direction) b. How are branches used in practice c. Merge/Pull requests. 4 eyes principles. Connection to CI/CD 5. Commiting for Open Source (if we have time) a. Forking (incl. Forking a forked git) Basics What is git? ● Software for source code management ○ Fancy way of saying: “takes care of your sources” ○ Current state but also complete history of development ○ Fantastic for group/team work
● Are git and github the same thing?
○ No. Git is CLI software/protocol ○ Github is a webapp. There are many other available! ○ (But) they work very very well together Basics Commands Commands: ● Clone → make a local copy of a project on your disk ● Add → let git know to track a file ● Status, Commit → “save” the changes. Attention! This is not uploading the changes on the git server ● Push → Uploading these chances and make them available to everybody ○ Attention to when files have changed meanwhile ● Pull → Download changes that have been uploaded meanwhile ● Rebase; merge → combine local with remote changes (if they collide) Basics Objects ● Project ● File ● Commit message ● Log ● Branches ● Pull/Merge requests ○ Commiter ○ Reviewer Git in action PyCharm Demo (btw https://www.jetbrains.com/community/education/#students) Reference https://product.hubspot.com/blog/git-and-github-tutorial-for-beginners
A nice tutorial: https://www.youtube.com/watch?v=RGOj5yH7evk