by jph · 9y ago · 0 comments
If you're interested in branch aliases, here are some that may be helpful that I use at GitAlias.com.
topic-start = "!f(){ branch=$1; git checkout master; git fetch; git rebase; git checkout -b "$branch" master; };f"
topic-pull = "!f(){ branch=$(git branch-name); git checkout master; git pull; git checkout "$branch"; git rebase master; };f"
topic-push = "!f(){ branch=$(git branch-name); git push --set-upstream origin "$branch"; };f"
topic-finish = "!f(){ branch=$(git branch-name); git checkout master; git branch --delete "$branch"; git push origin ":$branch"; };f"
branch-name = rev-parse --abbrev-ref HEAD
Git Town is a strict superset of your tools. Your "topic start" == "git hack". Your "topic pull" and "topic-push" = "git sync" (you always want to run both anyways). Your "topic-finish" = "git ship".
Want to join forces?
What I like most about using aliases for topic branches (a.k.a. feature branches) is that any team can define its preferred workflow and encapsulate it.