Some cool stuff you should know about git #2
Here is some cool stuff you should know about git (also please check my other protips for more):
Let the git guess what you meant, by...
Are you tired of git complaining about your typos? How many times a day you see something like:
git: 'checout' is not a git command. See 'git --help'
Did you mean this?
checkout
Well, you can actually tell git to do something about its smartypants assumptions. Here is a line you should execute in your shell:
git config --global help.autocorrect 1
Easy switching between two branches
When you work in a Unix environment, sometimes you switch between two directories a lot, using a handy shortcut cd -
. Wouldn't it be handy to have something similar for git? Because typying branch names over and over while doing checkout is annoying, right?
If so, you should be delighted to hear that git has a similar command to cd -
. Next time, just type: git checkout -
Written by Radosław Jędryszczak
Related protips
4 Responses
git checkout - is awesome! Very nice tip.
As for crorecting your txet, you shouldn't be so lzazzy.
Nice, I want more!
You are welcome guys. @ablemike, being "lazy" there means I can be productive elsewhere, if you know what I mean :)
git co -
, it's great!