3. What is git?
● Distributed Version Control System (DVCS)
● Compatible with all OS
● For team or single developers
● Record changes to files
● Revert files back
● Review changes over time
● See who changed what?
● Detect issue source
5. Distributed Version Control Systems
● Easier to setup
● Less data loss risk
● Review changes locally
● Better speed
● Dev. Independency
DVCS benefits:
6. github
● Extend functionalities
● Save server management
● Visual interface
● Search issues / Google
● Comments
● Tag issues
● Stats
● Credits
● Integrations (Travis, Jenkins..)
18. git branch / git br
http://git-scm.com/book/en/Git-Branching-Branching-Workflows
git branch cool-branch
Create a branch:
Create and enter in a branch:
git checkout -b cool-branch
Delete a merged branch:
git branch -d cool-branch
Delete branches even not merged:
git branch -D cool-branch
Default list branches
24. git log tricks
git l libraries/joomla/form/field.php
log for a specific file/folder:
search commits from one user:
git l --author=”Roberto”
search in commits messages
git l --grep=”internet explorer”
27. Your first commit
Ensure that you are in a clean (and updated) branch
git checkout staging
Create a new branch:
git checkout -b fields-error
{edit files on your IDE}
Staging files:
git add templates
28. git add tricks
Add all files:
git add -A
Add only new files:
git add .
Add only modified files:
git add -u
29. Committing changes
Commit staged changes:
git commit -m ‘[imp] Code style fixes’
Always review status:
git status
Undo last commit without losing changes:
Amend files to last commit:
git commit --amend -C HEAD (alias “git amend”)
git reset --soft HEAD^ (alias “git undolast”)
30. Push branch to your fork
git push origin fields-error
local fork
upstream origin
Your forkMain repo
fields-error
32. Pull request message
● Informative title
● Describe the issue
● Add screenshots (it’s free!)
● Add testing instructions
● Document features
● Comment if it’s a WIP
● Mention people if you need
help