automatically using -v option for git remote

I'd like to automatically use the -v option for the git remote command. How can I do this?

Answers


Run this:

git config --global alias.remotes 'remote -v'

That will place a git command alias in your git configuration file. To use it, type git remotes. Unfortunately, you can't over-ride an actual git command with an alias.


Add an alias to your shell commands, like this:

alias grem='git remote -v'

technically this should go in .bashrc, and you should reference that from .profile (or .bash_profile).

Then you can use a much shorter command, and get what you wanted:

grem

So, your .bashrc file (in your home directory), would contain all of your aliases, and then your .profile/.bash_profile (whichever you have) would contain:

if [ -f ~/.bashrc ]; then
   . ~/.bashrc
fi

Need Your Help

Why is a comma captured in this group?

python regex

I want write a python regex to match the number in a string consisting of a number followed by a comma. For instance, I want to match 34 within 34,. However, the regex that I’m using matches the co...

Add part of NSArray to other NSArray

ios objective-c nsmutablearray nsarray

I'm trying to add part of a large NSArray to another NSArray. However, I'm doing something wrong since it keeps throwing errors.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.