Introduction to Git, the architecture of git and learn using git with Atlassian Bitbucket and Sourcetree. Also briefs about git-lfs and Bitbucket pipelines. Presented at Nasscom Game Developer's Conference 2017 at Hyderabad.
8. Chapter Title Here
Spilled coffee on hard drive?
Malicious vandalism?
Data center hit by
meteor?
Accidental branch deletion?
No biggie!
We’re
on
rm -rf in the wrong
directory?
13. Ref -> Mutable pointer to an
object
Usually a commit
refs/head/master -> commit fecd6578…
Automatically store DAG
For objects rooted at these refs
Collection of Refs
branches and tagsGit
Repository
14. Ref -> Mutable pointer to an
object
Usually a commit
refs/head/master -> commit fecd6578…
Automatically store DAG
For objects rooted at these refs
Collection of Refs
branches and tagsGit
Repository
15. Ref -> Mutable pointer to an
object
Usually a commit
refs/head/master -> commit fecd6578…
Automatically store DAG
For objects rooted at these refs
Collection of Refs
branches and tagsGit
Repository
36. Wrong commit
Pushed a commit on the
wrong branch?
Common mistakes
Need to switch
Can’t commit but want to
switch to a new branch?
Wrong branch
Have local changes, but on
the wrong branch
37.
38. Same branch
Works best only when you apply these changes
on the same branch.
Small - Big changes
Acts as an archive for changes when you want
to switch branch without having to commit or
loose you changes when you switch
Need to
Switch?
Stash
Apply stash
Whenever you are ready to resume work, apply
your stash on the branch
39. Same branch
Works best only when you apply these changes
on the same branch.
Small - Big changes
Acts as an archive for changes when you want
to switch branch without having to commit or
loose you changes when you switch
Need to
Switch?
Stash
Apply stash
Whenever you are ready to resume work, apply
your stash on the branch
40. Same branch
Works best only when you apply these changes
on the same branch.
Small - Big changes
Acts as an archive for changes when you want
to switch branch without having to commit or
loose you changes when you switch
Need to
Switch?
Stash
Apply stash
Whenever you are ready to resume work, apply
your stash on the branch
42. Switch branch
Switch to another branch or create a new
branch
Small changes
Ideal with small changes. Saved on disk as a diff
file.
Wrong
branch?
Patch
Apply Patch
Select and apply the patch in the new branch
43. Switch branch
Switch to another branch or create a new
branch
Small changes
Ideal with small changesWrong
branch?
Patch
Apply Patch
Select and apply the patch in the new branch
44. Switch branch
Switch to another branch or create a new
branch
Small changes
Ideal with small changesWrong
branch?
Patch
Apply Patch
Select and apply the patch in the new branch
45.
46.
47. Reset to commit
You could also reset the branch to an earlier
commit. This is a destructive action using reset.
Reverse commit
If you’ve already pushed the change to remote,
just revert it and this will roll back changes with
an extra commit. Uses revert
Wrong
commit?
Reset
If changes are local, you could just run clean and
the branch will be pristine
48. Reset to commit
You could also reset the branch to an earlier
commit. This is a destructive action using reset.
Reverse commit
If you’ve already pushed the change to remote,
just revert it and this will roll back changes with
an extra commit. Uses revert
Wrong
commit?
Reset
If changes are local, you could just run clean and
the branch will be pristine
49. Reset to commit
You could also reset the branch to an earlier
commit. This is a destructive action using reset.
Reverse commit
If you’ve already pushed the change to remote,
just revert it and this will roll back changes with
an extra commit. Uses revert
Wrong
commit?
Reset
If changes are local, you could just run clean and
the branch will be pristine. Uses clean internally.
75. LFS
Store rich media and
large data in your
repos
Code Aware
Search
Semantic search that
ranks definitions first
Issue tracker
Use integrated issue
tracker backed by
JIRA and even a
Trello board
Pipelines
Integrated CI/CD
Bitbucket