-
Clone this repository
git clone https://github.com/pipelineinc/alias4git.git -
Locate global .gitconfig file location on your machine -
Default on windows machine is home directory ( %USERPROFILE% )
-
Update contents of your global .gitconfig to below -
# replace file paths below with matching filepaths from cloned alias4git repository
[include]
path = <path\\to\\alias4git\\alias.gitconfig> # make sure to remove '<' and '>'
[alias]
cfg = !git config --file <path\\\\to\\\\alias4git\\\\alias.gitconfig>
[user]
email = <your-email>
name = <your-name>
- Update alias.gitconfig path to appropriate path of cloned alias4git repository
- Follow setup steps mentioned above
- Open command prompt
- Change current directory to alias4git repository
cd path\to\alias4git - Add new alias using command -
instead of
git cfg alias.st "status"git config --global alias.st "status" - Check if newly added alias is visible in list
or using
git cfg -lgit cfglist - Commit your change to this repository using git and create Pull Request
git add . git commit git push - Ask your team to sync alias4git repository by pulling new changes
git pull
