DEV Community

Discussion on: 5 git tips for beginners

Collapse
 
cyberjack profile image
CyberJack

As a beginner, isn't it better to learn the real commands instead of learning the aliases?

Your aliases are only available on machines with your git configuration. If you depend on aliases, you'll run into problems if they're not available (if you need to work on another machine, for example).

Also, look at switch to manage branches. Checkout has multiple responsibilities, which isn't a good thing. Switch and restore were created to split these responsibilities into their own commands.

Collapse
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️ • Edited

Good aliases make it easy to remember the long hand versions:

git config --global alias.dog 'log --decorate --oneline --graph'
Enter fullscreen mode Exit fullscreen mode

Checkout has multiple responsibilities, which isn't a good thing

Yep, that's really a problem with some git commands: they do too much and often unrelated things.