-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
TemplateTemplate issueTemplate issue
Description
Aliases
- Where would you put a
.gitconfigfile that should contain aliases and settings to be shared among team members? - How would you include the file?
- How would you instruct new team members to include the file?
- Go through your three config files and move anything worth sharing into you new file.
- Is there anything left in your
--globalfile? - What command would you use to get a quick overview of all your aliases - and the scope that they come from?
- Add, commit and push your changes
One specific feature that git users seek to get out of the git config files are aliases. Often short-hand favourites to (too) long commands like:
co = checkout
st = status
Or it can be home-made names for long-and-hard-to-remember commands like my:
root = rev-parse --show-toplevel
You define them as entries under the alias group:
Try this:
git co
git st
git root
git config --global --add alias.co checkout
git config --global --add alias.st status
git config --global --add alias.root "rev-parse --show-toplevel"
git co
git st
git root
Metadata
Metadata
Assignees
Labels
TemplateTemplate issueTemplate issue