Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tadghh/git-aliases

Git aliases simplifying common or odd tasks.
https://github.com/tadghh/git-aliases

Last synced: 7 days ago
JSON representation

Git aliases simplifying common or odd tasks.

Awesome Lists containing this project

README

        

# Git Aliases
Git aliases simplifying common or odd tasks.

## How to add an alias
- Edit your .gitconfig file
- C:\Users\\%USERNAME%\\.gitconfig
- Under the [alias] section
- git alias command
- git config --global alias."alias name" "command1; command2; command3"
- Ex.
- git config --global alias.atomic '!f() { git add . && git commit -am "$1" && git push; }; f'

## Aliases

### Atomic commits
add untracked files, commit, and push.


Usage

git atomic "Title" "Message"

Install Command



git config --global alias.atomic '!f() { git add . && git commit -am "$1" && git push; }; f'

___

### Refresh local
Clears all local changes and pulls the latest version of the current branch.


Usage

git fresh

Install Command



git config --global alias.fresh '!f() { current_branch=$(git rev-parse --abbrev-ref HEAD); git reset --hard; git fetch origin; git checkout $current_branch; git pull origin $current_branch; }; f'