https://github.com/fespinoza/custom-git-scripts
A collection of custom git commands to speed up my git workflow
https://github.com/fespinoza/custom-git-scripts
git git-workflow github
Last synced: 5 months ago
JSON representation
A collection of custom git commands to speed up my git workflow
- Host: GitHub
- URL: https://github.com/fespinoza/custom-git-scripts
- Owner: fespinoza
- License: mit
- Created: 2018-01-15T20:22:00.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-11-14T11:53:56.000Z (about 2 years ago)
- Last Synced: 2025-04-06T00:43:40.291Z (10 months ago)
- Topics: git, git-workflow, github
- Language: Ruby
- Size: 14.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Custom Git Scripts
A collection of custom git commands to speed up my git workflow. This add some
extra useful git commands.
## Installation
First download the repo
```
git clone https://github.com/fespinoza/custom-git-scripts
```
Then make sure you add the directory to your `$PATH` in the terminal, for
example for zsh, adding to the `.zshrc`
```
export PATH="/bin:$PATH"
```
## Usage
The commands added are:
- `git alias`: adds a new global alias
Example: `git alias cdbrm 'clean-development-branches master'`
- `git changelog-from-parent`: returns a formatted list of commits of changes
not present in the parent branch
- `git clean-development-branches`: given a base branch, it will remove all the
branches that were merged to the base branch. Useful to clean all the branches
of merged pull requests.
Example: `git clean-development-branches master`
- `git not-released`: given a `base-ref` and a `current-ref` returns a formatted
list of pull request merged into `current-ref` that are not present in
`base-ref`. Useful to list all the pull request merged since a tag, etc.
Example: `git not-released builds/beta/81 master`
- `git open-in-github`: opens the origin repository in the browser for the
public github or the enterprise version.
## Aliases
The new git commands are supposed to be descriptive, now for convenience you
can add some aliases, (with the `git alias` command for example). This are some
that i recommend:
```bash
git cdbrm # clean development branches from master
git cl # change list from parent branch
git clp # change list from parent branch and copy it to clipboard
git nr # not released changes
```
A full list of my personal aliases can be found in [my dotfiles][dotfiles-git]
[dotfiles-git]: https://github.com/fespinoza/dotfiles/blob/master/gitconfig#L7