I have a bunch of handy aliases set up in the config file for my git repository. I will occasionally clone this repository (e.g. onto my laptop), but the clone does not included any of the aliases I've set up, presumably because the clone does not copy the git config file where the aliases are stored. I would, however, like to have these aliases available when working with the clone without having to set them up again manually. Has anyone found a good solution for this?
相关问题
- Why does recursive submodule update from github fa
- Extended message for commit via Visual Studio Code
- Save html in cookie
- Emacs shell: save commit message
- Can I organize Git submodules in a flat hierarchy?
相关文章
- 请教Git如何克隆本地库?
- GitHub:Enterprise post-receive hook
- Git Clone Fails: Server Certificate Verification F
- SSIS solution on GIT?
- Compile and build with single command line Java (L
- Is there a version control system abstraction for
- ssh: Could not resolve hostname git: Name or servi
- Cannot commit changes with gitextensions
The aliases: are they defined as being for you as the user or for a specific repository?
Each repository can have it's own specific .gitconfig (simply the config file) file within the .git directory (or wherever you set $GIT_DIR to).
For more info check out the docs: http://git-scm.com/docs/git-config (specifically the FILES section)
You can put aliases into your $HOME/.gitconfig file to make them apply to all repositories on a single machine. (Or set of machines sharing home directories). That's certainly where I keep all mine.