Jeff Lembeck learns a code or two

Serious code business!

My Git Workflow

Ya know what I hate?

[Project/dev] Merge branch 'dev' of into dev - Jeff Lembeck

being all up in my commit logs.

So, I've changed up my git workflow a little bit to fix this:

Say I get a new feature to build on project "Project".

Normally, we work in the dev branch, and then push that thing into master after it's all tested and what not.


~/code/Project (dev) $ git co -b feature

This feature has 5 or 6 little code pieces to get it going.

~/code/Project (feature) $ git aa && git ci

SIDENOTE: I have some aliases up in my ~/.gitconfig file. aa = add --all ci = commit -i co = checkout

Make my comment, repeat a few times for every little thing I do.

$ git co dev $ git pull origin dev $ git co feature $ git rebase -i dev

Squash all of my commits down into one fantastic feature commit.

$ git co dev $ git merge feature

Pow. 1 commit added to our dev commit logs for this entire feature. Easy to navigate and easy to read.

Back to Blog