Skip to content

Instantly share code, notes, and snippets.

@tlberglund
Created October 15, 2012 15:59

Revisions

  1. Tim Berglund revised this gist Oct 15, 2012. 1 changed file with 7 additions and 2 deletions.
    9 changes: 7 additions & 2 deletions jax-git-workshop.md
    Original file line number Diff line number Diff line change
    @@ -18,6 +18,7 @@
    * `git log --patch`
    * `git log --pretty=raw`
    * `git log --pretty=oneline --abbrev-commit --graph`
    * Log live command: [https://gist.github.com/3714970](https://gist.github.com/3714970)
    * Aliases
    * `git config --global alias.lol "log --pretty=oneline --abbrev-commit --graph"`
    * `git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %C
    @@ -39,9 +40,13 @@ green(%ci) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative --all"`
    * `git checkout -b <branchname>`
    * Merging
    * `git merge <featurebranch>`
    * Resolving a conflicted pull request
    * `git ls-remote origin`
    * `git fetch /refs/pull/18/head`
    * `git merge FETCH_HEAD`
    * Rebasing
    * `git rebase <feature>`
    * `git rebase -i HEAD~5`
    * Undo
    * `git reflog`
    * `git reset --hard HEAD@{1}`
    *

  2. Tim Berglund created this gist Oct 15, 2012.
    47 changes: 47 additions & 0 deletions jax-git-workshop.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,47 @@
    # JAX Git Workshop

    ## Outline
    * `git init project`
    * `git config --global user.name "Tim Berglund"`
    * `git config --global user.email "[email protected]"`
    * `git status`
    * `git add <file>`
    * Diff
    * `git diff`
    * `git diff --staged`
    * `git diff --color-words`
    * `git diff --word-diff`
    * `git diff -w`
    * Logging
    * `git log`
    * `git log --stat`
    * `git log --patch`
    * `git log --pretty=raw`
    * `git log --pretty=oneline --abbrev-commit --graph`
    * Aliases
    * `git config --global alias.lol "log --pretty=oneline --abbrev-commit --graph"`
    * `git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %C
    green(%ci) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative --all"`
    * Deleting
    * `git rm <file>`
    * `git add -u .`
    * Moving
    * `git mv <file> <newfile>`
    * `git add -A .`
    * Collaborating
    * `git remote add origin <repo url>`
    * `git push -u origin master`
    * `git config --global branch.autosetuprebase always`
    * `git config branch.master.rebase true`
    * Branching
    * `git branch <branchname>`
    * `git checkout <branchname>`
    * `git checkout -b <branchname>`
    * Merging
    * `git merge <featurebranch>`
    * Rebasing
    * Undo
    * `git reflog`
    * `git reset --hard HEAD@{1}`
    *