Skip to content

Instantly share code, notes, and snippets.

@Olshansk
Olshansk / github_checkout_remote.sh
Created September 25, 2024 22:10
Git helpers to checkout collaborator branches from the main or forked repos
# Example usage: gcor feature-branch
# This will create a local branch 'feature-branch' based on 'origin/feature-branch'
function gcor {
# Create a new branch locally based on a remote branch from origin
git checkout -b $1 origin/$1
# Set the upstream branch for the new local branch to track the remote branch
git branch --set-upstream-to=origin/$1 $1
}
@rocketraman
rocketraman / passwordsync
Last active June 20, 2025 14:10
Keepassxc password sync using rclone
#!/usr/bin/env bash
#
# Copyright 2020 Raman Gupta
# LICENSE: https://opensource.org/licenses/MIT
# https://gist.github.com/rocketraman/820d94f2f9c8731a6f2d56cbc2ddb60f
#
# Syncs a local keepassxc database with a remote source via rclone.
# The basic process is:
# 1) rclone copy to temporary local location
# 2) use keepassxc cli to merge the remote database into the local one