Software Engineering Methods


Software Modelling & git

TI3115TU -- 2024-09-12

Learning Objectives


  • Explain basic principles of code management
  • Modify contents of code repository
  • Share and collaborate with code
  • Understand significance of code management
  • Encouraged to mock around with repositories

whoami?


who are you?

% whoami: mark


(Linux) sysadmin, Developer, DevOps Engineer
PhD Candidate (2021-)

Avarage programmer
Enjoy helping people with code
Coding should be fun and inclusive!

Worked with source code before?

Did you enjoy that?

Frustrated by source code/tools?

What would you like to program?

Learning Objectives


Part 1 (today)
  • Installation
  • Modification
  • Synchronization
Part 2 (next week)
  • Collaboration
  • Code quality
  • Standardisation

Learning Objectives Part 1


Git logo

  • Installation
  • Modification
  • Synchronization
github-stats

It's really simple

It's really simple


  • git log
  • git status
  • git add
  • git commit
  • git push
  • git pull
  • History of changes
  • Current status
  • Selecting changes to save
  • Save changes to history
  • Upload changes
  • Download changes

Reasons to use git


"Time machine" & Backup

Multiple devices

Collaboration

Structuring work

It's free

Time machine?

Time machine


  • git log
  • git diff
  • git diff
  • git checkout
  • git checkout -b
  • History of changes
  • Current changes
  • Changes: to now
  • Restore version
  • Create a 'branch'

Installation: git shell & gui:s


Built-in: git gui & gitk

IDE git tools (built-in git shell)

3rd Party: IDE git tools

Example: Sourcetree sourcetree screenshot
git-scm.com/downloads/guis 3rd party git tools
xkcd If that doesn't fix it, git.txt contains the phone number of a friend of mine who understands git. Just wait through a few minutes of 'It's really pretty simple, just think of branches as...' and eventually you'll learn the commands that will fix everything

Learning Git


Getting help

🔗 Learning Resources


QR-code to link
Don't panic, read and practice!

  • git help
  • git help -a
  • git help -g

  • git help everyday
  • git help tutorial
🔗 Git games and sandboxes

[Optional] Homework


  • Cloning repo (+Authentication)
  • Adding changes
  • Undoing commits

Why do we need git?

How did it come about?

How does it affect us?

Git and Linux


torwalds working

I'm an egotistical bastard, and I name all my projects after myself. First 'Linux', now 'git'


  • decentralized development
  • autonomy for devs and communities
freedoms

Development is a collaborative taskt


Version control enables parallel development

control development vs. encourage development

SVN hierarchy

SVN - old(er) version coltrol system

git facilitating development


Free and Open Source Software

Cooperation without central coordination

Decentralized architecture

Everyone owns everything

Synchronize

git push - git pull

pull and push

merge conflicts

Developer Platforms

Git logo

Developer Platforms


  • git remote
  • Git & file UI
  • Social featuers
  • DevOps
Learning Objectives

Part 1 (today)
  • Installation
  • Modification
  • Synchronization
Part 2 (next week)
  • Collaboration
  • Code quality
  • Standardisation
Learning Objectives (next week)

  • Understand ideas behind different workflows
  • Apply tools to help with standardisation
  • Understand and reflect on code quality
  • Take part in constructive code reviews