Do all git commands have a --dry-run option, or one which would indicate what the command would do without actually doing them?
+2
A:
While there isn't always a --dry-run
flag for every comment, there are usually equivalents. For example, this previous question shows what to do for git merge
.
Amber
2010-04-04 08:32:14
+3
A:
Not every command would naturally support a dry run directly.
- git merge has its own option (
git merge --no-commit --no-ff
) - but git pull does not really need it ('
git fetch origin
', then a 'git log master..origin/master
', before agit merge origin/master
)
(butgit push
has a dry-run option)
There are things that are not implemented in git because they do not make sense, and there are things that are not implemented in git because nobody had itch to scratch for.
To put it differently, we tend to implement only things that there are actual, demonstrated needs for from real world and only when the addition makes sense as a coherent part of the system.
VonC
2010-04-04 09:45:38