Tagged Questions
12
votes
4answers
706 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 ...
12
votes
3answers
3k views
Answer yes in a bash script
I'm trying to do a git clone trough a bash script, but the first time that I run the script and the server is not known yet the script fails. I have something like this:
yes | git clone ...
9
votes
2answers
354 views
Can git configuration be set across multiple repositories?
Git seems to support configuration values at three levels:
Per-system global settings (stored in /etc/git-core)
Per-user global settings (stored in ~/.gitconfig)
Per-repository local settings ...
5
votes
4answers
126 views
Change command-line “environment” to programs command
In a console, is it possible to change into a commands "environment"? To explain, I take "git" as an example. While programming and using a git repository, I change to the repos path and then do many ...
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
1answer
262 views
Git - remove deleted files
I'm using this simple git alias
rmdel = "!git rm $(git ls-files -d)"
meant "remove deleted", i.e. to remove from the staging area all files deleted from the file system. It works fine except ...
3
votes
2answers
122 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 ...