Commit b76f8e1d authored by Manu's avatar Manu
Browse files

Initial commit

parents
alias status="git status"
alias s="git status"
alias push="git push"
alias pull="git pull"
alias branch="git branch"
alias checkout="git checkout"
alias log="git log"
alias git-reset-repository="git clean -fdx"
alias git-undo="git reset HEAD --hard"
alias git-authors="git log --pretty=format:"%an%x09" . | sort | uniq"
alias git-undo-unstaged-changes="git stash save --keep-index --include-untracked"
#!/bin/bash
RED='\033[0;31m'
BLUE='\033[1;34m'
NC='\033[0m' # No Color
echo -e "${RED}THIS SCRIPT RESETS ALL REPOSITORIES!${NC}"
read -p "Continue with CLEANING ALL REPOSITORIES? ALL CHANGES WILL BE LOST!" choice
case "$choice" in
y|Y ) echo -e "${RED}CLEANING EVERY REPO NOW${NC}"
for D in *; do
if [ -d "${D}" ]; then
echo -e "${BLUE}${D}${NC}"
cd "${D}"
git clean -fdx
cd ..
fi
done
;;
n|N ) echo "Aborted clean.";;
* ) echo "Aborted because input was invalid.";;
esac
#!/bin/bash
RED='\033[0;31m'
BLUE='\033[1;34m'
NC='\033[0m' # No Color
for D in *; do
if [ -d "${D}" ]; then
echo -e "${BLUE}${D}${NC}"
cd "${D}"
git branch
cd ..
fi
done
#!/bin/bash
RED='\033[0;31m'
BLUE='\033[1;34m'
NC='\033[0m' # No Color
for D in *; do
if [ -d "${D}" ]; then
echo -e "${BLUE}${D}${NC}"
cd "${D}"
git status
cd ..
fi
done
git log --author="Manu" --format=%B | grep -v -e '^$' > file.txt
\ No newline at end of file
#!/bin/bash
RED='\033[0;31m'
BLUE='\033[1;34m'
NC='\033[0m' # No Color
for D in *; do
if [ -d "${D}" ]; then
echo -e "${BLUE}${D}${NC}"
cd "${D}"
git pull
cd ..
fi
done
#!/bin/bash
RED='\033[0;31m'
BLUE='\033[1;34m'
NC='\033[0m' # No Color
for D in *; do
if [ -d "${D}" ]; then
echo -e "${BLUE}${D}${NC}"
cd "${D}"
git push
cd ..
fi
done
git filter-branch --env-filter '
NEW_NAME="Manu"
NEW_EMAIL="admin@full-stack.ninja"
export GIT_COMMITTER_NAME="$NEW_NAME"
export GIT_COMMITTER_EMAIL="$NEW_EMAIL"
export GIT_AUTHOR_NAME="$NEW_NAME"
export GIT_AUTHOR_EMAIL="$NEW_EMAIL"
' --tag-name-filter cat -- --branches --tags
git filter-branch --env-filter '
WRONG_EMAIL="wrong@email.com"
NEW_NAME="Manu"
NEW_EMAIL="admin@full-stack.ninja"
if [ "$GIT_COMMITTER_EMAIL" = "$WRONG_EMAIL" ]
then
export GIT_COMMITTER_NAME="$NEW_NAME"
export GIT_COMMITTER_EMAIL="$NEW_EMAIL"
fi
if [ "$GIT_AUTHOR_EMAIL" = "$WRONG_EMAIL" ]
then
export GIT_AUTHOR_NAME="$NEW_NAME"
export GIT_AUTHOR_EMAIL="$NEW_EMAIL"
fi
' --tag-name-filter cat -- --branches --tags
\ No newline at end of file
git config user.name "Manu"
git config user.email "admin@full-stack.ninja"
echo "Author set to 'Manu -> admin@full-stack' for this repo"
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment