Hi,
with recent switch to GH I made myself a little helper to sync fork and
rebase your branch
on top of that. Hopefully someone will find it useful. The usage is
"./script.sh $NAME_OF_MASTER" (usually master for gerrit projects, newer GH
have main).

#!/bin/bash -e

ORIGIN=$(git branch --show-current)

# Go to master/main/base (gco)
git checkout $1
# Fetch all remotes (gfa)
git fetch --all --prune
# Merge upstream remote into master/main/base (gm)
git merge upstream/$1
# Push master/main/base into origin (gp)
git push origin $(git branch --show-current)
# Switch back to previous branch (gco)
git checkout $ORIGIN
# Rebase the branch (gl)
git pull --rebase


Best regards,
Ales
-- 

Ales Musil

Software Engineer - RHV Network

Red Hat EMEA <https://www.redhat.com>

amu...@redhat.com    IM: amusil
<https://red.ht/sig>
_______________________________________________
Devel mailing list -- devel@ovirt.org
To unsubscribe send an email to devel-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/devel@ovirt.org/message/Q6VNN4VB56VC5SHRIF7UY7Q3534VE2QL/

Reply via email to