Version Control with git
- r: Why you don’t want to live without it!
October 15th, 2014
living knowledge WWU Münster
WESTFÄLISCHE WILHELMS-UNIVERSITÄT MÜNSTER
Version Control with git or: Why you dont want to live without it! - - PowerPoint PPT Presentation
W ESTFLISCHE W ILHELMS -U NIVERSITT M NSTER Version Control with git or: Why you dont want to live without it! living knowledge WWU Mnster October 15th, 2014 W ESTFLISCHE W ILHELMS -U NIVERSITT M NSTER Version Control with git
WESTFÄLISCHE WILHELMS-UNIVERSITÄT MÜNSTER
WESTFÄLISCHE WILHELMS-UNIVERSITÄT MÜNSTER
Version Control with git 2 /21
◮ “I do backups already!” ◮ “I already use dropbox to share my work.” ◮ “Is git not used by the linux kernel...”
◮ “I’m just working alone on a small project...”
, , felix.schindler@wwu.de
WESTFÄLISCHE WILHELMS-UNIVERSITÄT MÜNSTER
Version Control with git 3 /21
AT
, , felix.schindler@wwu.de
WESTFÄLISCHE WILHELMS-UNIVERSITÄT MÜNSTER
Version Control with git 4 /21
, , felix.schindler@wwu.de
WESTFÄLISCHE WILHELMS-UNIVERSITÄT MÜNSTER
Version Control with git 5 /21
◮ git init, git add, git commit ◮ git status, git log, git diff [--word-diff] ◮ git gui, gitk
, , felix.schindler@wwu.de
WESTFÄLISCHE WILHELMS-UNIVERSITÄT MÜNSTER
Version Control with git 6 /21
[FROM: http://git-scm.com/book/]
, , felix.schindler@wwu.de
WESTFÄLISCHE WILHELMS-UNIVERSITÄT MÜNSTER
Version Control with git 6 /21
[FROM: http://git-scm.com/book/]
, , felix.schindler@wwu.de
WESTFÄLISCHE WILHELMS-UNIVERSITÄT MÜNSTER
Version Control with git 6 /21
[FROM: http://git-scm.com/book/]
, , felix.schindler@wwu.de
WESTFÄLISCHE WILHELMS-UNIVERSITÄT MÜNSTER
Version Control with git 6 /21
[FROM: http://git-scm.com/book/]
, , felix.schindler@wwu.de
WESTFÄLISCHE WILHELMS-UNIVERSITÄT MÜNSTER
Version Control with git 6 /21
, , felix.schindler@wwu.de
WESTFÄLISCHE WILHELMS-UNIVERSITÄT MÜNSTER
Version Control with git 6 /21
, , felix.schindler@wwu.de
WESTFÄLISCHE WILHELMS-UNIVERSITÄT MÜNSTER
Version Control with git 7 /21
, , felix.schindler@wwu.de
WESTFÄLISCHE WILHELMS-UNIVERSITÄT MÜNSTER
Version Control with git 8 /21
, , felix.schindler@wwu.de
WESTFÄLISCHE WILHELMS-UNIVERSITÄT MÜNSTER
Version Control with git 8 /21
◮ git clone https://github.com/pymor/pymor.git ◮ ... do your changes... ◮ git format-patch -M origin/master
, , felix.schindler@wwu.de
WESTFÄLISCHE WILHELMS-UNIVERSITÄT MÜNSTER
Version Control with git 9 /21
, , felix.schindler@wwu.de
WESTFÄLISCHE WILHELMS-UNIVERSITÄT MÜNSTER
Version Control with git 9 /21
◮ git clone https://github.com/pymor/pymor.git ◮ ... do your changes... ◮ git remote add personal https://my-repo.org/pymor.git ◮ git push personal master ◮ request a pull from your repository
, , felix.schindler@wwu.de
WESTFÄLISCHE WILHELMS-UNIVERSITÄT MÜNSTER
Version Control with git 10 /21
◮ create a login ◮ “fork” the repository (creates a new copy of the repository belonging to you) ◮ ... do your changes... ◮ push your changes in a feature branch ◮ create a pull request
, , felix.schindler@wwu.de
WESTFÄLISCHE WILHELMS-UNIVERSITÄT MÜNSTER
Version Control with git 11 /21
◮ your local copy contains the complete repository (including the history) ◮ no single point of failure ◮ “automatic” backups
, , felix.schindler@wwu.de
WESTFÄLISCHE WILHELMS-UNIVERSITÄT MÜNSTER
Version Control with git 12 /21
, , felix.schindler@wwu.de
WESTFÄLISCHE WILHELMS-UNIVERSITÄT MÜNSTER
Version Control with git 13 /21
, , felix.schindler@wwu.de
WESTFÄLISCHE WILHELMS-UNIVERSITÄT MÜNSTER
Version Control with git 13 /21
◮ git commit --amend ◮ creates a new commit
, , felix.schindler@wwu.de
WESTFÄLISCHE WILHELMS-UNIVERSITÄT MÜNSTER
Version Control with git 14 /21
, , felix.schindler@wwu.de
WESTFÄLISCHE WILHELMS-UNIVERSITÄT MÜNSTER
Version Control with git 14 /21
◮ git rebase -i HEAD N ◮ rewrites the last N commits
, , felix.schindler@wwu.de
WESTFÄLISCHE WILHELMS-UNIVERSITÄT MÜNSTER
Version Control with git 15 /21
, , felix.schindler@wwu.de
WESTFÄLISCHE WILHELMS-UNIVERSITÄT MÜNSTER
Version Control with git 15 /21
◮ git filter-branch --tree-filter ’rm -f *.pdf’ HEAD ◮ rewrites the complete history
◮ other possibilities ◮ change tab width in all commits ◮ change name/mail of author ◮ whatever fits between ’ ...
’
, , felix.schindler@wwu.de
WESTFÄLISCHE WILHELMS-UNIVERSITÄT MÜNSTER
Version Control with git 16 /21
, , felix.schindler@wwu.de
WESTFÄLISCHE WILHELMS-UNIVERSITÄT MÜNSTER
Version Control with git 16 /21
, , felix.schindler@wwu.de
WESTFÄLISCHE WILHELMS-UNIVERSITÄT MÜNSTER
Version Control with git 16 /21
, , felix.schindler@wwu.de
WESTFÄLISCHE WILHELMS-UNIVERSITÄT MÜNSTER
Version Control with git 16 /21
◮ may be OK for amend (within 60 seconds) ◮ not OK for rebase -i ◮ for filter-branch only with consent of all authors
, , felix.schindler@wwu.de
WESTFÄLISCHE WILHELMS-UNIVERSITÄT MÜNSTER
Version Control with git 17 /21
, , felix.schindler@wwu.de
WESTFÄLISCHE WILHELMS-UNIVERSITÄT MÜNSTER
Version Control with git 18 /21
, , felix.schindler@wwu.de
WESTFÄLISCHE WILHELMS-UNIVERSITÄT MÜNSTER
Version Control with git 18 /21
, , felix.schindler@wwu.de
WESTFÄLISCHE WILHELMS-UNIVERSITÄT MÜNSTER
Version Control with git 19 /21
, , felix.schindler@wwu.de
WESTFÄLISCHE WILHELMS-UNIVERSITÄT MÜNSTER
Version Control with git 19 /21
◮ download git-churn:
◮ git churn --since=’6 months ago’ path/ | tail
, , felix.schindler@wwu.de
WESTFÄLISCHE WILHELMS-UNIVERSITÄT MÜNSTER
Version Control with git 20 /21
◮ http://git-scm.com/book ◮ https://try.github.io ◮ http://mislav.uniqpath.com ◮ http://www.google.com
, , felix.schindler@wwu.de
WESTFÄLISCHE WILHELMS-UNIVERSITÄT MÜNSTER
Version Control with git 21 /21
, , felix.schindler@wwu.de