Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/tadghh/git-aliases
- Owner: tadghh
- Created: 2023-11-22T03:40:52.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2023-11-25T20:45:02.000Z (12 months ago)
- Last Synced: 2024-04-21T01:23:48.651Z (7 months ago)
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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'