Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git config - a team collaboration setup #9

Open
7 tasks
lakruzz opened this issue Feb 12, 2023 · 0 comments
Open
7 tasks

git config - a team collaboration setup #9

lakruzz opened this issue Feb 12, 2023 · 0 comments
Labels
Template Template issue

Comments

@lakruzz
Copy link
Member

lakruzz commented Feb 12, 2023

Aliases

  • Where would you put a .gitconfig file 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 --global file?
  • 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

@lakruzz lakruzz added the Template Template issue label Feb 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Template Template issue
Projects
None yet
Development

No branches or pull requests

1 participant