GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — vcxsrv/fastforwardotherbranch.sh at master · marchaesen/vcxsrv

Expand file tree

/

fastforwardotherbranch.sh

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
executable file
·
23 lines (19 loc) · 547 Bytes
/

fastforwardotherbranch.sh

Copy path

File metadata and controls

executable file
·
23 lines (19 loc) · 547 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
BRANCH=master
NEWER=origin/master
if [ $(git symbolic-ref HEAD) = "refs/heads/$BRANCH" ]
then
echo "This doesn't make sense if you're already on the branch '$BRANCH'"
echo "Just run: git merge $NEWER"
exit 1
fi
BRANCH_HASH=$(git rev-parse $BRANCH)
NEWER_HASH=$(git rev-parse $NEWER)
MERGE_BASE=$(git merge-base $BRANCH_HASH $NEWER_HASH)
if [ "$MERGE_BASE" = "$BRANCH_HASH" ]
then
git update-ref "refs/heads/$BRANCH" "$NEWER_HASH" "$BRANCH_HASH"
else
echo "$BRANCH can't be fast-forwarded to $NEWER"
exit 1
fi
You are visitor 01402605 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.