2012年3月25日 星期日

Git Config - Autocomplete & color

Though I'm not that familiar with git (a version control)

but I still find something good to help us use git better

like you can have the command autocomplete in Mac's terminal

or mark the filename and give it a different color so that we can check immediately

[wp_ad_camp_2]


if u'd like to add autocomplete into terminal, need to download git-completion
(unzip the git-completion.bash file to ~/ or any other place where u know)

than open terminal and type vim ~/.bash_profile
insert a new line source ~/git-completion.bash and save
(or replace ~/ with the place u put git-completion.bash file)

now just open a new terminal, enjoy the git command autocomplete!

another thing is the git status filename color(like pic below)
git_color.jpg
to use the color setting, just open terminal and type
git config --global color.ui true
and open a new terminal go to a git repository and enjoy it

Last,we can use alias to shorten some git command

Also,use terminal and type
git config --global alias.co checkout
git config --global alias.ci commit
git config --global alias.st status
now u can use git co as git checkout

Hope It helps a little!
[wp_ad_camp_1]

0 意見:

張貼留言