|
|
@@ -26,6 +26,28 @@ git-create() {
|
|
|
git commit -m "${message}"
|
|
|
}
|
|
|
|
|
|
+git-sync-release() {
|
|
|
+ rel="release/${1}"
|
|
|
+ br="$(git branch | grep '^\*' | cut -c3-)"
|
|
|
+
|
|
|
+ # Confirm that this is a real branch
|
|
|
+ (git branch -r | grep "${rel}" &>/dev/null) || return 1
|
|
|
+
|
|
|
+ # Merge dev
|
|
|
+ # Make sure that we're not doing a weird clobber
|
|
|
+ git checkout "${rel}" || return 2
|
|
|
+ # Sanity check...
|
|
|
+ git pull
|
|
|
+ git merge --ff-only origin/dev || return 3
|
|
|
+
|
|
|
+ # Update origin:release
|
|
|
+ git push
|
|
|
+ git checkout "${br}"
|
|
|
+
|
|
|
+ # Don't delete if we're on this branch
|
|
|
+ [[ "${br}" == "${rel}" ]] || git branch -D "${rel}"
|
|
|
+}
|
|
|
+
|
|
|
alias git-graph="git log --graph --pretty=oneline --abbrev-commit --decorate --all"
|
|
|
alias git-history-graph="git log --graph --pretty='format:%C(auto)%h (%<(50,trunc)%s, %ad)%d' --abbrev-commit --decorate --all"
|
|
|
|