Wystartuj z GITem w następnym projekcie.

Krzysztof Morcinek
20 październik, 2015

  • "Talk is cheap. Show me the code." - Linus Torvalds
  • I use console cause we can see (and understand) exactly what is happening

why we should learn

  • Much better than centralized control systems
  • gitbook - Pro Git
  • gitbook - Pro Git - polish
  • Requires some learning :)

decentralized

  • no server needed
  • whole history, logs always with you
  • work offline

tree

  • branch is pointer to commit

git rebase --interactive

  • pick, in another place
  • reword
  • edit
  • squash
  • fixup

git reflog

  • what happens in Git, stays in git
  • "forever", for 30 days
  • we want to retrieve something what happened hours ago, not weeks ago

rewriting history

  • locally play as much as possible
  • don't change history that was pushed
  • git push -f
  • my feature branch can be rewritten

merge vs rebase

  • Line-conflict
  • Conflict-with-manual-edit

unwanted merge

prefer rebase

  • git config --global --bool pull.rebase true

git svn

  • spull = svn rebase
  • spush = svn dcommit
  • works like a charm

example workflows

  • straight history
  • feature branches and commits to development (master)

aliases

  • rh = reset --hard
  • amend = commit --amend -aC HEAD
  • My example mappings

cherry-pick

  • TEST-ONLY commit pattern.

Thank You! Any question?

krzysztof.morcinek@gmail.com
kmorcinek
kmorcinek
Blog 'Show me the code'
[..] productive developers surround themselves with powerful tools for iterative development and debugging
Paul Irish