https://github.com/mrhwick/gitconfig
https://github.com/mrhwick/gitconfig
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mrhwick/gitconfig
- Owner: mrhwick
- Created: 2014-06-30T17:49:40.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2017-07-10T15:24:39.000Z (about 9 years ago)
- Last Synced: 2025-07-21T08:03:13.394Z (about 1 year ago)
- Size: 6.84 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hardwick's Git Configuration
These are my dark magic aliases that I prefer when I am using git.
### Installation
```bash
git clone https://github.com/mrhwick/gitconfig.git
cd gitconfig
cat gitconfig >> ~/.gitconfig
```
Edit the user information to match your actual email and name.
Reload your terminal, and your Git client will have discovered the new aliased commands.
### Usage
Common commands are shortened:
```bash
# git commit
git ci
# git status -s (shortened)
git st
# git checkout
git co
# git add
git a
# git add -p (patch mode)
git ap
```
Some helper command scripts are included for common workflows:
```bash
# Checkout the 'dev' branch and pull the latest code from remote named 'upstream'
git rst
# Checkout a new branch that clones the current branch and prefix the given name with 'feature/'
git feat my-new-thing
Switched to a new branch 'feature/my-new-thing'
# Checkout a new branch that clones the current branch and prefix the given name with 'hotfix/'
git fix my-hot-repair
Switched to a new branch 'hotfix/my-hot-repair'
# Push the current branch commits to the same branch on the remote named origin
git up
# Pull the latest commits from the current branch down from the remote named origin
git down
# Pull the latest commits from the current branch down from the remote named upstream.
git reload
# Delete all branches that have been merged into the latest commit on the current branch, excluding 'master', 'dev', 'staging', and 'qa'.
git delete-merged-branches
```
Some useful git log viewer command aliases are included:
```bash
# Show compact log information with pretty-formatted commit messages, branch name pointers, and authors.
git ls
```

```bash
# Show cozy log information with file changes and number of lines added/removed.
git ll
```

```bash
# Show expanded log information with most useful information included.
git ld
```
