This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Show specifically only the last commit to affect the path/to/file - | |
# this will be the commit where the file as deleted. | |
git log -1 -- path/to/file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## | |
# Name: wp-gitify | |
# Description: Turns the subversion repositories of wordpress | |
# plugins and themes into github read-only repositories. | |
# Author: Brian Greenacre <[email protected]> | |
# Requirements: git, svn, git-svn, svn2git, curl | |
## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function get_merge_revs { | |
MERGE=$(git rev-parse --abbrev-ref $REV); | |
MERGE_REV=$(git rev-parse $REV); | |
SHORT_MERGE_REV=$(echo $MERGE_REV | cut -c 1-7); | |
} | |
function get_orig_merge_revs { | |
ORIG_MERGE=$(git rev-parse --abbrev-ref $REV); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
# Get the first 7 characters of the SHA1 of the most common ancestor of the given revs | |
## | |
BASE_FULL_SHA1=$(git merge-base "$1" "$2"); | |
BASE=$(cut -c 1-7 <<< $BASE_FULL_SHA1); | |
## | |
# Get (roughly) the number of commits between the given revs. | |
# Add one for safety padding so the actual commit in question is included. | |
## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# readlink -f resolves symlinks but doesnt work on OSX or BSD. | |
# SYNC_BIN_PATH=`dirname $(readlink -f $0)` | |
# pwd is lazy, doesnt resolve symlinks, but works everywhere. | |
SYNC_BIN_PATH=$(pwd) | |
TMP_PATH="$SYNC_BIN_PATH/tmp" | |
REPO_PLUGINS="$SYNC_BIN_PATH/uxwpress/plugins/" | |
NEW_REPO_PLUGINS="$SYNC_BIN_PATH/plugins" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function actual_path() { | |
if [ [ -z "$1" ] -a [ -d $1 ] ]; then | |
echo $(cd $1 && test `pwd` = `pwd -P`) | |
return 0 | |
else | |
return 1 | |
fi | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
appliances | vacuums-floor-care | 20018 | |
---|---|---|---|
appliances | refrigerators | 20021 | |
appliances | small-kitchen-appliances | 20024 | |
baby | baby-health-safety | 20027 | |
baby | baby-gear | 20028 | |
baby | baby-diapering | 20029 | |
baby | baby-feeding | 20030 | |
jewelry | bracelets | 20060 | |
jewelry | jewelry-boxes-jewelry-care | 20061 | |
jewelry | earrings | 20063 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
appliances | disposers-compactors | 1020015 | |
---|---|---|---|
appliances | dishwashers | 1020017 | |
appliances | vacuums-floor-care | 1020018 | |
appliances | freezers-ice-makers | 1020019 | |
appliances | microwaves | 1020021 | |
appliances | refrigerators | 1020022 | |
appliances | small-kitchen-appliances | 1020025 | |
appliances | water-heaters | 1020026 | |
baby | baby-health-safety | 1020029 | |
baby | baby-gear | 1020030 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Do not call this function directly, add it to the body_class filter | |
* | |
* Conditionally adds classes to the body class of a page for styling purposes. | |
* These examples are from the Kmart Fashion and BirthdayClub themes. | |
* | |
* @author Eddie Moya | |
* | |
* @param type $classes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
branch=$(git name-rev --name-only HEAD) | |
git rebase --onto HEAD~2 HEAD~1 HEAD | |
git cherry-pick ORIG_HEAD~1 | |
git update-ref refs/heads/$branch $(git rev-parse HEAD) | |
git checkout --quiet $branch | |
# Instead of creating an independant bash script with the code above, | |
# consider simply creating a git alias using the command below. |