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
# Prepending text to the five most recent commit messages: | |
git filter-branch --msg-filter 'sed "s/\(.*\)/[prepended text] \1/g"' HEAD~5..HEAD | |
# Appending text to the five most recent commit messages: | |
git filter-branch --msg-filter 'sed "s/\(.*\)/\1 [appended text]/g"' HEAD~5..HEAD |
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/sh | |
BRANCH_NAME=$(git symbolic-ref --short HEAD) | |
STORY_NUMBER=$(echo $BRANCH_NAME | sed -n 's/.*-\([0-9]\)/\1/p') # Get story number from branch name - "my_feature_branch-123" | |
COMMIT_MSG=`cat $1` | |
if [ x != x${STORY_NUMBER} ]; then # Checf if STORY_NUMBER is NOT empty | |
if [ x = x${2} ]; then # Check if commit message is empty | |
sed -i.back "1s/^/#$STORY_NUMBER/" "$1" |
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
{ | |
"font_size": 14, | |
"hot_exit": false, | |
"ignored_packages": | |
[ | |
"Vintage" | |
], | |
"close_windows_when_empty": true | |
} |
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
C:\Program Files\Git\bin\sh.exe --login -i -new_console:d:"<path>" |
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
! [master] Test commit 01 - master | |
* [feature] Test commit 03 | |
-- | |
+ [master] Test commit 01 - master | |
* [feature] Test commit 03 | |
* [feature^] Test commit 02 | |
* [feature~2] Test commit 01 | |
+* [master^] Update ref tests |
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 | |
USAGE="USAGE: git append TEXT_TO_APPEND NUMBER_OF_COMMITS\nExample: git append \"#3301\" 5" | |
show_usage () { | |
echo -e "\n$USAGE" | |
} | |
case $1 in | |
help | -h | "/?") |
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
while :; do | |
output=$(git reflog) | |
clear | |
echo "$output" | |
sleep 1 | |
done |
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 | |
for i in {1..5} | |
do | |
git commit -m "$1 $i" --allow-empty | |
done |
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
[user] | |
name = "TO FILL" | |
email = "TO FILL" | |
[core] | |
autocrlf = true | |
excludesfile = C:\\Users\\tpraso\\Documents\\gitignore_global.txt | |
#editor = "'C:\\Program Files\\Sublime Text 3\\sublime_text.exe' -w -n" | |
editor = "'C:\\Program Files\\Sublime Text 3\\subl.exe' -w -n" | |
[alias] | |
lg = log --color --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cd) %C(yellow)<%an>%Creset' --date=human |
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 | |
if [ x = x${1} ]; then | |
echo ">>> Enter branch name" | |
exit 1 | |
fi | |
if [[ $1 == feature* ]] | |
then | |
BRANCH_NAME=$1 |
OlderNewer