Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F4213117
git-attach-head
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
mmodell
Jun 29 2016, 4:28 PM
2016-06-29 16:28:42 (UTC+0)
Size
318 B
Referenced Files
None
Subscribers
None
git-attach-head
View Options
#!/bin/bash
branch
=
$(
git branch -r --no-color --contains HEAD
|
head -n1
|
awk
'{gsub(".*/","");print $1}'
)
commit
=
`
git rev-parse HEAD
`
branch_commit
=
$(
git rev-parse
"
$branch
"
)
echo
"branch:
$branch
HEAD=
$commit
branch_commit=
$branch_commit
"
if
[
"
$commit
"
==
"
$branch_commit
"
]
;
then
echo
git checkout
$branch
fi
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3828700
Default Alt Text
git-attach-head (318 B)
Attached To
Mode
P3314 git-attach-head
Attached
Detach File
Event Timeline
Log In to Comment