Upload
others
View
11
Download
0
Embed Size (px)
Citation preview
Intermediary git
Joachim Desroches
GNU Generation
2019-03-27
Joachim Desroches (GNU Generation) Intermediary git 2019-03-27 1 / 11
Joachim Desroches (GNU Generation) Intermediary git 2019-03-27 2 / 11
Table of Contents
1 The basics
2 New stuff!
3 Conclusion
Joachim Desroches (GNU Generation) Intermediary git 2019-03-27 3 / 11
The basics
One-man git
git init, git add, git commit
git status, git log, git checkout, git diff
Do NOT confuse with project management systems like MicrosoftGithub or Gitlab!
Joachim Desroches (GNU Generation) Intermediary git 2019-03-27 4 / 11
The basics
One-man git
git init, git add, git commit
git status, git log, git checkout, git diff
Do NOT confuse with project management systems like MicrosoftGithub or Gitlab!
Joachim Desroches (GNU Generation) Intermediary git 2019-03-27 4 / 11
The basics
One-man git
git init, git add, git commit
git status, git log, git checkout, git diff
Do NOT confuse with project management systems like MicrosoftGithub or Gitlab!
Joachim Desroches (GNU Generation) Intermediary git 2019-03-27 4 / 11
The basics
Two man team
Remember about the central server ?
git push, git pull, git merge
Conflict resolution!
Joachim Desroches (GNU Generation) Intermediary git 2019-03-27 5 / 11
The basics
Two man team
Remember about the central server ?
git push, git pull, git merge
Conflict resolution!
Joachim Desroches (GNU Generation) Intermediary git 2019-03-27 5 / 11
New stuff!
Some more commit possibilities
git commit --amend, git add --patch
git commit --verbose, git commit -S
git bisect start/good/bad/...
Joachim Desroches (GNU Generation) Intermediary git 2019-03-27 6 / 11
New stuff!
Some more commit possibilities
git commit --amend, git add --patch
git commit --verbose, git commit -S
git bisect start/good/bad/...
Joachim Desroches (GNU Generation) Intermediary git 2019-03-27 6 / 11
New stuff!
Some more commit possibilities
git commit --amend, git add --patch
git commit --verbose, git commit -S
git bisect start/good/bad/...
Joachim Desroches (GNU Generation) Intermediary git 2019-03-27 6 / 11
New stuff!
Branches
So what is a branch ?
git branch, git checkout
master: branch, work, merge model.
Joachim Desroches (GNU Generation) Intermediary git 2019-03-27 7 / 11
New stuff!
Branches
So what is a branch ?
git branch, git checkout
master: branch, work, merge model.
Joachim Desroches (GNU Generation) Intermediary git 2019-03-27 7 / 11
New stuff!
Branches
So what is a branch ?
git branch, git checkout
master: branch, work, merge model.
Joachim Desroches (GNU Generation) Intermediary git 2019-03-27 7 / 11
New stuff!
Rebase: your complicated best friend
Moving trees around...
Avoiding Merge Commits: git rebase <branch>
Fixing the past: git rebase -i
THIS REWRITES YOUR HISTORY
Joachim Desroches (GNU Generation) Intermediary git 2019-03-27 8 / 11
New stuff!
Rebase: your complicated best friend
Moving trees around...
Avoiding Merge Commits: git rebase <branch>
Fixing the past: git rebase -i
THIS REWRITES YOUR HISTORY
Joachim Desroches (GNU Generation) Intermediary git 2019-03-27 8 / 11
New stuff!
Rebase: your complicated best friend
Moving trees around...
Avoiding Merge Commits: git rebase <branch>
Fixing the past: git rebase -i
THIS REWRITES YOUR HISTORY
Joachim Desroches (GNU Generation) Intermediary git 2019-03-27 8 / 11
New stuff!
Rebase: your complicated best friend
Moving trees around...
Avoiding Merge Commits: git rebase <branch>
Fixing the past: git rebase -i
THIS REWRITES YOUR HISTORY
Joachim Desroches (GNU Generation) Intermediary git 2019-03-27 8 / 11
New stuff!
New work model
Remember branch, work, merge ?
Now branch, work, rebase, work, rebase, clean merge!
Joachim Desroches (GNU Generation) Intermediary git 2019-03-27 9 / 11
New stuff!
New work model
Remember branch, work, merge ?
Now branch, work, rebase, work, rebase, clean merge!
Joachim Desroches (GNU Generation) Intermediary git 2019-03-27 9 / 11
New stuff!
Tig
Use the tig tool for your repos!
Beautiful history
Easy to see a file at a commit
Easy to see diffs
Joachim Desroches (GNU Generation) Intermediary git 2019-03-27 10 / 11
Conclusion
Conclusion
Remember man pages are your friend!
Read the Git Book: more depth and more possibilities
Most of all, use git! Practice makes perfect.
Questions ?
Joachim Desroches (GNU Generation) Intermediary git 2019-03-27 11 / 11
Conclusion
Conclusion
Remember man pages are your friend!
Read the Git Book: more depth and more possibilities
Most of all, use git! Practice makes perfect.
Questions ?
Joachim Desroches (GNU Generation) Intermediary git 2019-03-27 11 / 11
Conclusion
Conclusion
Remember man pages are your friend!
Read the Git Book: more depth and more possibilities
Most of all, use git! Practice makes perfect.
Questions ?
Joachim Desroches (GNU Generation) Intermediary git 2019-03-27 11 / 11
Conclusion
Conclusion
Remember man pages are your friend!
Read the Git Book: more depth and more possibilities
Most of all, use git! Practice makes perfect.
Questions ?
Joachim Desroches (GNU Generation) Intermediary git 2019-03-27 11 / 11