jlblancoc/awesome-git-tricks

Put this in your PATH and get new handy Git commands

★ 0Forks 1ShellGitHub ↗Compare

README

awesome-git-tricks

Put this in your PATH and get new handy Git commands

Install

cd ~/code  # put here some workspace/code/work directory you like
git clone https://github.com/jlblancoc/awesome-git-tricks.git
cd awesome-git-tricks

# Add to .bashrc
echo "export PATH=$(pwd):\$PATH" >> ~/.bashrc

# activate it:
. ~/.bashrc

Command list

git clean-removed-in-origin

Deletes all local branches corresponding to branches that were already removed in origin.

git push-this-branch [optional flags]

Pushes the current branch only to the default remote.

git tidy-subdirs [-j N]

For each immediate subdirectory of the cwd that is a git repo, checks out its default branch and runs git-clean-removed-in-origin on it. Repos are processed in parallel (-j sets the number of concurrent jobs, default 4) and a summary of successes, skips, and errors is printed at the end.

Contributors

jlblancoc

Issues