Skip to content

Instantly share code, notes, and snippets.

@antoni
antoni / gist:ab29e5d2a9aee3aeea41
Last active December 29, 2022 14:30
Git cheat sheet
# Move code from one repo to another, preserving commit history
# Source: http://stackoverflow.com/a/17373088/963881
cd repo2
git checkout master
git remote add r1remote **url-of-repo1**
git fetch r1remote
git merge r1remote/master
git remote rm r1remote
# Push to master without having to --set-upstream-to first
@antoni
antoni / android_get_db.sh
Created April 13, 2014 08:38
Pulls SQlite database from Android device
#!/bin/bash
REQUIRED_ARGS=2
PULL_DIR="./"
ADB_PATH=`which adb`
if [ $? -ne 0 ]
then
echo "Could not find adb!"
exit 1
fi;