Tagged Questions
18
votes
3answers
3k views
How to colorize output of git?
Is there a way to color output for git (or any command)?
Consider:
baller@Laptop:~/rails/spunky-monkey$ git status
# On branch new-message-types
# Changes not staged for commit:
# (use "git add ...
12
votes
4answers
761 views
How can I create an alias for a command that includes a space?
Most of my my aliases are of this form: alias p='pwd'
I want to alias git commit so that it does git commit -v
But trying to create an alias with a space gives an error:
$ alias 'git commit'='git ...
5
votes
2answers
530 views
What does “--” mean in Linux/Unix command line? [duplicate]
Possible Duplicate:
What does “--” (double-dash) mean?
git diff [options] [<commit>] [--] [<path>…]
In here, how should I understand what [--] means? And when should I use it.
5
votes
3answers
513 views
extracting “tag” information from git with a shell script
The vc bundle is a neat little package that extracts information about a git repo for easy insertion into a LaTeX document. It doesn't currently extract information about whether the current commit is ...
5
votes
1answer
143 views
Custom bash autocomplete for git breaks other git autocomplete features
I am trying to add autocompletion to git commit upon hitting TabTab.
The autocomplete feature I am working on is based on a branch-naming convention. The convention is to append the PivotalTracker ...
4
votes
1answer
102 views
How does this git alias work?
Usually, git aliases are confined to a single command:
git config --global alias.ci commit
So, instead of git commit you could do git ci
But it seems you can insert a function in there as well:
...
3
votes
2answers
148 views
place the aliased version of an existing command in /usr/bin/
I use Vim a lot, and I know how I can start vim in insert mode. So I have an alias named vii in my .bash_aliases file.
On other hand I use Git a lot too, and I have this line in my .gitconfig:
...
3
votes
3answers
696 views
How can I pass output of one command as an argument to another
A similar question has been asked, but since I am new to Unix the answer was not clear to me due to the context. What I want to do is to pass the output of one command as an argument to another. I am ...
3
votes
2answers
207 views
Specifying which git repo to use
I have a bash script, called cgit, that acts as git for one specific git repo (located at /.git):
#!/bin/bash
cd /;
sudo git $@ > /dev/stdout
I use it to keep track of imporant system files:
...
3
votes
1answer
130 views
Bash script with quotes and spaces
I'm trying to get some nice output out of git:
FORMAT='%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'
LOG_PARAMS="--color --pretty=format:$FORMAT --abbrev-commit ...
3
votes
2answers
123 views
create pseudo shell for a command
I feel like this should be straighforward to some degree...
Basically, for some command, I want to be able to invoke another command that will scope all params to that command. so...
git commit -am ...
2
votes
1answer
274 views
Git auto-complete
I am using Git as many of you do. Also, I don't use any GUI for that — just CLI. So I was wondering: are there any way to make Git commands (git status, git checkout etc.) complete themselves when ...
0
votes
2answers
632 views
Git Server Bash and SSH
I want to use Git over SSH with my Linode VPS running Ubuntu 10.04 LTS.
Instructions seem pretty easy, infact given I had already setup my SSH key etc..
All I had to do was instruct my local ...