Upgrade to Pro — share decks privately, control downloads, hide ads and more …

GIT: what else?

GIT: what else?

Basic talk to GIT concepts and workflows.

Alexandru Simonescu

January 29, 2016
Tweet

More Decks by Alexandru Simonescu

Other Decks in Programming

Transcript

  1. GIT

  2. work modes you don’t need to be connected to network

    _offline first _no need of network _synchronize only when you want and what you want
  3. commit registers file snapshot in git graph git add <file>

    git add --all git add *.java git commit -m “Commit message”
  4. branch registers file snapshot in git graph git checkout -b

    feature git branch -d feature git branch -v git branch -a
  5. remote local repository can track more than one remote git

    remote git remote -v git remote add origin <url>
  6. stash registers file snapshot in git graph git stash git

    stash list git stash apply stash@{0}
  7. diff useful to see differences between commits or branches git

    diff <branch_a> <branch_b> git diff <commit_1> <commit_2>
  8. choose right prefix be a good citizen motherfucker • feat:

    a new feature • fix: a bug fix • docs: changes to documentation • style: formatting, missing semi colons, etc; no code change • refactor: refactoring production code • test: adding tests, refactoring test; no production code change • chore: updating build tasks, package manager configs, etc; no production code change
  9. 1 work on your files 2 add edited files to

    staging area 3 make a commit 4 push commits to remote server (optional) 5 pull remote files 6 work on your files upstream downstream