Bird
0
0

You want to set a Git alias co for checkout that works only in one repository without affecting others. Which command should you use?

hard📝 Application Q8 of 15
Git - Configuration and Aliases
You want to set a Git alias co for checkout that works only in one repository without affecting others. Which command should you use?
Agit config --global alias.co checkout
Bgit config alias.co checkout
Cgit config --system alias.co checkout
Dgit alias add co checkout
Step-by-Step Solution
Solution:
  1. Step 1: Identify scope for alias

    To limit alias to one repo, set it in local config without --global or --system.
  2. Step 2: Verify correct command syntax

    git config alias.co checkout sets alias locally. Other options set global, system, or are invalid.
  3. Final Answer:

    git config alias.co checkout -> Option B
  4. Quick Check:

    Local alias = git config without flags [OK]
Quick Trick: No flag means local config, perfect for repo-specific alias [OK]
Common Mistakes:
  • Using --global for repo-specific alias
  • Trying invalid git alias add command
  • Confusing system and local config

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes