Skip to content

Instantly share code, notes, and snippets.

View dariodaich's full-sized avatar
🎮
There are levels to it.

Dario Daić dariodaich

🎮
There are levels to it.
  • ButterflyMX
  • Croatia, Zagreb
View GitHub Profile

Git Branching - Remote Branches

Commands

  • git ls-remote: displays references available in a remote repository along with the associated commit IDs.
  • git remote show {remote name}: Manage the set of repositories ("remotes") whose branches you track.
  • git branch | git branch -v | git branch -vv
  • git fetch {remote name}
  • git pull: Fetch from and integrate with another repository or a local branch.
  • git checkout -b {branch} {remote name}/{remote branch name}: checks out a new local branch and sets it up to track remote branch
@dariodaich
dariodaich / pry_28_04_2016.md
Created April 27, 2016 15:17
Pry quasi-blitz talk
@dariodaich
dariodaich / greed_koan.rb
Last active February 22, 2016 00:31
Solution to Ruby "greed koan".
# Greed is a dice game where you roll up to five dice to accumulate
# points. The following "score" function will be used to calculate the
# score of a single roll of the dice.
#
# A greed roll is scored as follows:
#
# * A set of three ones is 1000 points
#
# * A set of three numbers (other than ones) is worth 100 times the
# number. (e.g. three fives is 500 points).