A pleasant walk through computing

Comment for me? Send an email. I might even update the post!

"My" Git Aliases (with a nod to Smith and Jones)


(Pete Duel, we miss you.)

And by "my", I mean mostly other people's. I've just renamed and/or tweaked them. Thank you, Phil Haack!

Here's my GitHub dotfiles repo.

https://github.com/bladewolf55/dotfiles

Reference
Include my Git Aliases | You’ve Been Haacked

[alias]
  # HISTORY AND STATE
  st = status -s
  # List all branches
  branches = branch -a
  # Displays last 10 commits by default, or the supplied number of commits
  hist = "!f() { git log -${1-10} --pretty=format:\"%C(auto) %h %ad | %d %s [%an]\" --graph --date=short; }; f"
  # All branches
  hista = "!f() { git log -${1-10} --pretty=format:\"%C(auto) %h %ad | %d %s [%an]\" --graph --date=short --all; }; f"
  # Generate zip of file differences between two commits. Second commit defaults to HEAD.
  diffpatch = "!f() { git archive --output=diffs.zip HEAD $(git diff --diff-filter=d --name-only $1 ${2-HEAD}); }; f"
  # Show renamed or added files
  diffshow =  "!f() { git diff $1 ${2-HEAD} --name-only --diff-filter=AR; }; f"
  
  # CURRENT CHANGE
  save = !git add -A && git commit -m 'SAVEPOINT'
  undo = reset HEAD~1 --mixed
  # Hard reset to previous ref, but saves current state first
  restore = "!f(){ git add -A && git commit -qm 'RESTORE SAVEPOINT'; git reset $1 --hard; }; f"

  # GROW, MARK, TWEAK
  co = checkout 
  cob = checkout -b 
  # Commits using supplied message, or opens editor if message omitted
  # cm = "!f() { git add -A; [ -z \"$1\" ] && git commit || git commit -m \"$1\" ; }; f"
  # This version lets you continue after entering the first line of the message, and ends when double-quote is entered
  cm = !git add -A && git commit -m 
  # Commit and amend, opens editor
  cma = !git add -A && git commit --amend
  # Commit and open the interactive editor
  cmi = !git add -A && git commit 
  # Rebase onto branch
  rb = rebase 
  rbi = rebase -i 
  rba = rebase --abort
  # Merge branch into, preserving branch history
  mb = merge --no-ff --log 
  mba = merge --abort
  # Delete branch
  delb = branch -d 
  # Tag branch with message = name
  tagb = tag -a -m ""

  # COLLABORATE
  sync = !git pull --rebase && git push
  syncfork = !git checkout master && git pull upstream/master && git push origin/master
  # Open and browse the remote repository's URL
  browse = "!f(){ URL=$(git config remote.origin.url); open ${URL%.git}; }; f"

Proposal: Combine Agile and Craftsmanship Manifestos into "Agile Crafted Software Values"

Why not combine the Agile Manifesto and the Software Craftsmanship Manifeso?

Here's my suggestion, trying to remain faithful to the meaning, spirit, and brevity of the originals.

Agile Crafted Software Values

An interacting community of professionals over processes and tools

Well-crafted, working software over comprehensive documentation

Productive collaboration and partnerships over contract negotiation

Responding to change by adding value over following a plan

That is, while there is value in the items on the right, we have found the items on the left to consistently yield greater benefits.

Motivation

Arguably, the most influential document for modern software engineering is the 2001 Agile Manifesto, laying out the values and principles of what it means to develop in an effective way. It's easy to forget--or even not ever read--these principles, instead believing that they're enforced by the various methodologies. Several original signatories have rightly complained about what's happened to their vision.

Agile has been taken over by corporations to make a buck.

I think it's important to remember two things:

  1. Agile is not a method. Methods should implement agile values and principles.
  2. Agile methods aren't for project management. They're for software development.

Thus, in 2009, Software Craftsmanship was proposed to reaffirm the central role of developers.

These shouldn't exist separately. By combining them, I think value is added.

Suggestion for Uncle Bob: Change "Software Craftsmanship" to "Crafted Software"

Robert "Uncle Bob" Martin has struggled with gender neutrality regarding the term "crafstman." It's a difficult problem--English has a lack of neuters--and it's good he's struggling because it means he's listening to the very real affect of terminology on women in the workplace.

Craftsman, Craftswoman, Craftsperson

I suggest flipping the syntax, so, not "software craftsmanship," but "crafted software." Likewise, we can eschew "craftsman" by using "crafter."

Thus:

Crafted Software not Software Craftsmanship
Software Crafter not Software Craftsman, Craftswoman, Craftsperson
Software Crafting as in, "The discipline of software crafting" not "The discipline of software craftsmanship"
Craft as in, "It's about craft" (or crafting) not "It's about craftsmanship"

Using these terms has the added benefit of them being shorter, which I like. But maybe you're not into the whole brevity thing.