Skip to content

Instantly share code, notes, and snippets.


Tomasz Prasołek tomaszprasolek

Block or report user

Report or block tomaszprasolek

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
tomaszprasolek / git-feature
Last active Mar 27, 2019
Script create local branch and after that set upstream branch
View git-feature
if [ x = x${1} ]; then
echo ">>> Enter branch name"
exit 1
if [[ $1 == feature* ]]
tomaszprasolek /
Created Jan 9, 2019
Create 5 empty commits with passed message. For test purposes only.
for i in {1..5}
git commit -m "$1 $i" --allow-empty
tomaszprasolek / Change commiter and author date
Last active May 31, 2019
Change commiter and author date
View Change commiter and author date
git filter-branch --env-filter \
'if [ $GIT_COMMIT = 50421880a94e18f9344b43574eecbbab8e941c89 ]
export GIT_AUTHOR_DATE="Fri Nov 2 12:00:00 2018 +0000"
export GIT_COMMITTER_DATE="Fri Nov 2 12:00:00 2018 +0000"
View git reflog live script
while :; do
output=$(git reflog)
echo "$output"
sleep 1
tomaszprasolek / git_script.ahk
Last active Jun 19, 2019
My Git AutoHotKey script.
View git_script.ahk
#SingleInstance force
#IfWinActive ahk_class VirtualConsoleClass
::grc::git rebase --continue
::gmt::git mergetool
::gpf::git push --force-with-lease
::gch::git checkout
::gri::git rebase -i HEAD~
::gc::git commit
::gca::git commit --amend
::gcan::git commit --amend --no-edit
View git-append
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 | "/?")
tomaszprasolek / git show-branch output
Last active Oct 25, 2018
Code is used in my blog.
View git show-branch output
! [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
View Git bash start in cmder
C:\Program Files\Git\bin\sh.exe --login -i -new_console:d:"<path>"
View SublimeUserSettings.txt
"font_size": 14,
"hot_exit": false,
"close_windows_when_empty": true
tomaszprasolek / filter-branch-prepend-and-append
Created Jul 11, 2018 — forked from openjck/filter-branch-prepend-and-append
Using sed and filter-branch to prepend and append to Git commit messages without newlines
View filter-branch-prepend-and-append
# 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
You can’t perform that action at this time.