Skip to main content
Home
Grace in Motion

Main navigation

  • Home
  • About
User account menu
  • Log in

Breadcrumb

  1. Home

Pro Git Chapter 6 notes

By admin, 9 June, 2012

Chapter 6 notes
git show enterfirstfewshahere
add branch to show
git show HEAD^ shows parent
git log master..experiment shows all commits on exp not on master
git log ^refA refB all commits from multiple braches not on master
git log master...exp all commites reachable by either not both

-i for many commands starts interactive mode
you can use this to patch or stage parts of files you have changed

stashes
git stash saves uncommited and not added files so you can switch branches, etc
git stash list shows all stashes
git stash apply applys last stash
git stash apply stash@(n) applies older stashes

this doesn't change previously staged files; use git stash --index
git stash drop stash@(n) removes stash
git stash show -p stash@{0} | git apply -R unapplies last stash
git stash branch to turn a stash into a branch

amending
git commit --amend changes last commit message
$ git rebase -i HEAD~3
$ git rebase -i HEAD~2^ allows you to edit last 3 commits (both)
rebasing also allows for changing the order or splitting a commit
filtering a branch can remove a file from every commit, like a file with passwords

git blame shows the contents of a file and the commits that got it there.
git blame -L #,# limits line numbers returned.
git bisect is cool for debug; git bisect start, bad, good[commit]; then it starts in between. tell git good or bad until bug is found.

Submodules
skipping.

Recent content

  • Titles and GSD
    12 hours ago
  • Execs are wearisome to train
    1 month ago
  • Your support team is your most important user
    1 month ago
  • Talking about culture
    1 year 6 months ago
  • Recession Proofing
    2 years 3 months ago
  • Relearning Drupal, Preface
    2 years 3 months ago
  • 2023 Reset
    2 years 3 months ago
  • Antipatterns in Saas, cont'd
    2 years 3 months ago
  • Drupal 10 is not super easy
    2 years 4 months ago
  • Being a Q AND A Man
    2 years 7 months ago
RSS feed
Powered by Drupal