Skip to content

Commit

Permalink
add git remote remove
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankatliarchuk committed Sep 22, 2020
1 parent 6cc75c7 commit 19bdae3
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,15 @@ These scripts are meant to run only on OS X
- [ ] Dotbot templater plugin
- [ ] Dotbot import private repos plugin

## QA

> How to switch project specific versions and golang verions
## Awailable Commands

<!-- START makefile-doc -->
```
$ make help
$ make help
Usage: make [target] [VARIABLE=value]
Targets:
install-local Install locally
Expand All @@ -175,7 +179,7 @@ vm-dowm Run on Mac. Down
ignore-dirty Ignore dirty commits
install-deps Install dependencies
git-submodule Git submodules update
git-module-remove Remove submodule MODULE=something
git-module-remove Remove submodule MODULE=something
```
<!-- END makefile-doc -->

Expand Down
23 changes: 23 additions & 0 deletions shell/functions
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,25 @@ versions() {
echo "macOS: $(archey -c)"
}

# Remove remote branches
gitrmb() {
branch=""
pattern=""
while :; do
case $1 in
-b|--branch) branch="$2"; shift ;;
-p|--pattern) pattern="$2"; shift ;;
*) echo "Usage: $0 [-b <mastere|develop>] [-p <fix/*|feat/*>]" 1>&2; break ;;
esac
shift
done
if [ -n "$branch" ] && [ -n "$pattern" ]; then
git branch -r --format "%(refname:short)" --merged "origin/${branch}" | cut -d/ -f2- | grep "${pattern}" | xargs -n 1 git push --delete origin
else
echo "No branches removed."
fi
}

# Provide information about currect user
iam() {
echo -e "$(whoami) < whoami"
Expand Down Expand Up @@ -371,3 +390,7 @@ tunnel() {
local port="${4}"
ssh -nfNJ "${user}@${bastionip}" "${user}@${privatip}" "-L127.0.0.1:${port}:127.0.0.1:${port}"
}

big-folders() {
du -k * | awk '$1 > 500000' | sort -nr
}

0 comments on commit 19bdae3

Please sign in to comment.