Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F56269896
git-respawn
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
453 B
Referenced Files
None
Subscribers
None
git-respawn
View Options
#!/usr/bin/env bash
BRANCH
=
$(
git
rev-parse
--abbrev-ref
HEAD
)
if
[
"
$BRANCH
"
=
"master"
]
;
then
echo
"You're already on the master branch."
exit
1
fi
# Updates master branch if there isn't any staged change and working tree is clean
git
checkout
master
git
diff-index
--quiet
--cached
HEAD
--
&&
git
diff-files
--quiet
&&
git
pull
git
branch
-D
"
$BRANCH
"
# Fetch new branch
if
[
${
BRANCH
:
0
:
10
}
=
"arcpatch-D"
]
;
then
arc
patch
${
BRANCH
:
9
}
fi
File Metadata
Details
Attached
Mime Type
text/x-shellscript
Expires
Fri, Nov 6, 11:07 (1 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4144570
Default Alt Text
git-respawn (453 B)
Attached To
Mode
rOPS Nasqueron Operations
Attached
Detach File
Event Timeline
Log In to Comment