mahara uk 2011 technical day - git for mahara
DESCRIPTION
My presentation/workshop from the Mahara UK 2011 technical day.This gives a quick insight into Git, what git is, some of the useful features of git are, and how it can be used in Mahara.TRANSCRIPT
Mahara UK 2011 – Technical Conference21st June 2011
Andrew Nicols
Git in Mahara
Git in Mahara
• What is Git?• Some of the Basics• Remotes• Branch, Branch, Branch!!!• Rebases and Merges• Splitting and Squashing• Other Cool Stuff• Q&A
What is Git?
• Free• Open Source• Distributed Version Control System• Every Git Clone is a full-fledged repository
• Complete History• Not network dependent• No requirement for central server• Very fast
Some Basics
• git clone
• git init
• git add
• git add –p
• git commit
• git commit --amend
• git log
• git log –stat=500
• git log -p
• git status
• git diff
• git diff --cached
Remotes
Git is great for collaborative working
It allows you to have multiple remotes
git remotegit remote showgit remote addgit fetchgit push
Branch, Branch, Branch!!!
Branches are cool
Branches don’t suck in Git (yes I know they do in subversion)
git checkout –b <branchname>git branchgit branch --all
Rebases and Merges
Rebase rewrites history
Merge combines histories
Rebasing changes the parent of a commit
Don’t use rebase if you’re going to step on someone elses toes
git rebase origin/mastergit rebase gerrit/mastergit merge my_local_branch
Rebases and Merges
Rebases and Merges
Rebases and Merges
Rebases and Merges
Splitting and Squashing
Re-write your commits before you make them public
Keep things tidy
git edit –i HEAD~3
Other Cool Stuff
git grepgit cherry-pickgit format-patchgit bisectgit refloggitkgit shortloggit archive
Q&A