Professional Documents
Culture Documents
First Draft
First Draft Second Draft
Third Draft
Third Draft
Local vs
Windows Commits & Branches
Remote Repositories
Command Prompt The Basics
The Basics
Run Code
Execute Files
User Friendly Time Saving
Terminal Shell
pwd cd /Users rm
(print working directory) (users directory) (delete file)
ls cd or cd ~ rmdir
(list items) (home directory) (delete empty folder)
cd (..) touch cp
(change directory) (create/ ”touch” file) (copy file/folder)
cd / mkdir mv
(root directory) (create directory) (move file/folder)
Windows: Command Prompt – Useful Commands
The Basics
Module Content
Working Directory
Commit
“Snapshot 1“ index.html styles.css images
Web Shop
Commit
“Snapshot 2“ styles.css
Commit
“Snapshot 3“ script.js
Git under the Hood
add commit
styles.css styles.css styles.css
head
Detached HEAD
Unstaged Changes
Staged Changes
Latest Commit(s)
Branches
Basic Commands Summary: General
git commit –m
Create new commit
“message“
Git 2.23+
git checkout
Go to branch
branchname
Resolving Conflicts
Combining Master & Feature Branches
? ?
Goal:
Combining master & feature branch
Merge Types
Fast-Forward
Non Fast-Forward
Recursive Octopus
Ours Subtree
Master & Feature – Merge (“fast-forward“)
No additional commit in
master m.1 m.2 ?
master
(after feature branch was
created)
Additional commits in
master m.1 m.2 m.3 ?
both master & feature
branch after feature
branch was created
Merge
Rebase Cherry-Pick
(non fast-forward)
git reflog A log of all project changes made including deleted commits
git rebase Change the base (i.e. the parent commit) of commits in another branch
Copy commit including the changes made only in this commit as HEAD to other
git cherry-pick
branch
Understanding GitHub
git push
git pull
git merge
git fetch
Remote Branch
master master
(“origin“ repository)
Remote repository‘s name (“origin“) and branch name must always be added
Branch Types - Overview
Tracking Branch
git fetch
git push
git pull
Collaborating in GitHub
& Contributing to Open Source Projects
Cloud Storage
Portfolio Page
Collaboration
Contribution
Understanding Account Types
Every GitHub user‘s Shared account for groups of Central management of multiple
user account people to collaborate GitHub accounts
Unlimited public & private Base features as for GitHub Enterprise Cloud & GitHub
repositories personal account Enterprise Server
Repository 1 Repository 1
Repository 2 Repository 2
… …
Comparing Clone…
Clone
Account A Account B
Local copy
git clone
Account A Account B
Remote copy
Fork on GitHub
Remote repo Remote repo
Local copy
Accept pull request
git clone
GitHub
Account Types Repository Types Security
Collaboration
Collaborators Organizations Teams
A Real-World Example
Module Content