-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgit-refresh
More file actions
executable file
·30 lines (23 loc) · 823 Bytes
/
git-refresh
File metadata and controls
executable file
·30 lines (23 loc) · 823 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
###############################################################################
# Handle options
###############################################################################
# Display the help
if [ "${1:-}" = "-h" ] || [ "${1:-}" = "--help" ]; then
echo -e "
After you've published and finished merging your feature, run this to update
master, delete all merged branches and end up standing on master.
Now you're ready to run \`git start {branch}\`.
\e[33mUsage:\e[0m
git refresh
\e[33mOptions:\e[0m
\e[32m -h, --help \e[0m Display this help message
"
exit 0;
fi
###############################################################################
# Script
###############################################################################
git checkout master && \
git pullmaster && \
git deletemerged