rezaprima (owner)

Forks

Revisions

gist: 39869 Download_button fork
public
Public Clone URL: git://gist.github.com/39869.git
Embed All Files: show embed
Bash #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
function current_git_branch {
  git branch 2> /dev/null | grep '\*' | awk '{print $2}'
}
 
hack()
{
  CURRENT=$(current_git_branch)
  git checkout master
  git pull origin master
  git checkout ${CURRENT}
  git rebase master
  unset CURRENT
}
 
ship()
{
  CURRENT=$(current_git_branch)
  git checkout master
  git merge ${CURRENT}
  git push origin master
  git checkout ${CURRENT}
  unset CURRENT
}