By Jose Carlos Urra Llanusa
Black slides basic git
White slides (Workshop instructions)
I assume you join this workshop because
- You have difficulties in managing documentation across projects and you are looking for a better way to manage documentation effectively individually and in teams.
- You have heard about github and probably have used it, but you don’t really understand how to use it, why is it for, etc.
- You are learning or considering learning how to code.
- You are curious about open source maybe…
Or maybe just for ECTS?
is there another reason why you joined ?
Agenda for today
In the morning we will work with git version control locally and individually focusing on personal version control.
In the afternoon we will learn git as a collaborative tool and I will share some tips for project and workflow documentation, how I deal with projects using git.
+
Lets see some of the problems that can make our lives miserable as designers
If this is already a problem individually imagine what happens within a team
What is a Git? (according to Wiki)
Git (noun) : British for idiot. [see also: twat]
Git (computer-science) : a distributed version-control system for tracking changes in source code during software development.….but it can be used to track changes in any set of files.
What is a Git really?
a distributed version-control system for tracking changes in source code
What is NOT Git?
Go to https://git-scm.com/
Basic concepts
Git 101
Terms you should understand:
Command Line
# Save global credentials
$ git config --global user.name "Vlad Dracula"
$ git config --global user.email "vlad@tran.sylvan.ia"
# Create a new repository
$ git init
# Copy an existing repository
$ git clone <HTTP link of repo>
Command Line
# Information about repo
$ git status
$ git branch -a
# Adding changes
$ git add <filename1> <filename2> ...
$ git add . (adds everything in the current directory)
Command Line
# Adding changes
$ git commit -m “Commit Message”
$ git pull
$ git push
# Checking log
$ git log
$ git log --pretty=oneline
Command Line
# Checkout out / Branching
$ git checkout <branch name / commit ID / hash>
$ git checkout -b <new branch name>
$ git push --set-upstream origin <new branch name>
# After working on your branch:
$ git diff <branch name> #Shows all differences in each file
$ git push
Command Line
# Merging Branches and resolving conflicts
$ git checkout master
$ git merge <new branch name>
$ git branch -d <new branch name>
Command Line
# If merge fails:
Round 1: Lets try it out
Round 2: Lets play with a .scad model in the editor
Round 3: Lets document our project
Other things to consider with using git
Open Source Collaboration
and Git hosting services
A bit of background and history on open source
My main motivations to study and work on open source projects
Github is a hosting service of git repositories to support collaboration like gitlab
Round 3: Git remotes and collaboration in gitlab
Steps
Key concepts
Other things to consider when using git and remote repositories
Things we didn’t cover
Tutorials to learn git