3 ms·
Git Town looks thorough to me. It includes well-written source code in Go, plenty of edge-case error checking, good messages, and excellent feature tests. Kudos
by jph 9y ago
Git Town looks thorough to me. It includes well-written source code in Go, plenty of edge-case error checking, good messages, and excellent feature tests. Kudos!
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
- tokenizerrr 9y agoWhy not just `git fetch; git rebase origin/master`?
- jph 9y agoPersonal preference. I prefer to get the local master up to date first. A more-sophisticated alias would/could verify that the local master is buildable, testable, etc. before doing the rebase. 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.
- evilstiefel 9y agoThis might also be "dangerous" if git is set to the matching scheme instead of simple, since you don't just pull origin master. I guess anybody simply copying these from here should just be aware and be careful of what they just paste :D.
- jwilk 9y agoYou should backslash-escape your inner double-quotes.
- jph 9y agoThanks for the advice! Done.
- kevingoslar 9y agoGit Town contributor here. Thanks! I love your aliases. That's exactly how Git Town started. Then people kept adding logic to cover edge cases, abort and undo operations, as well as Github and Bitbucket integration. Soon enough we ended with many hundreds of lines of Bash. Hence the recent rewrite in Go. 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?