New answers tagged git
2
It is a good starting point, but "generally" needs to be emphasized. For utility commands it is always a good idea to read the man utility page for what is correct syntax.
There is a guideline at The Open Group that can be worth a read. However there is varying level of how conforming implementations are. Some implementations allow one to break this ...
3
git is the command. It "multiplexes" to the various other git-* commands based on what the first argument is, e.g. git config ... runs git-config.
0
A nice alternative is SmartGit. It has some very similar features to SourceTree and has built in 3-column conflict resoluvtion, visual logs, pulling, pushing, merging, syncing, tagging and all things git :)
2
From the git submodule man page:
A non-zero return from the command in any submodule causes the processing to terminate. This can be overridden by adding || : to the end of the command.
This means the following should do the job:
git submodule foreach 'git push origin :foo || :'
The || is an OR and executes the next command if the first one returns ...
1
Just to cover the other methods:
Method #1: --nopager
git submodule foreach 'git --nopager grep x'
Method #2: completely disable pager
git config --global core.pager cat
From the git-config man page:
core.pager
The command that git will use to paginate output. Can be
overridden with the GIT_PAGER environment variable. Note that git ...
3
Try changing the pager that git uses:
GIT_PAGER="cat" git submodule foreach 'git grep x'
Or if you want less to be used, but only when output will run off of the screen:
GIT_PAGER="less -FX" git submodule foreach 'git grep x'
You can set the pager per project by using git config, or you can, of course, set the environment variables globally.
Top 50 recent answers are included
