Added a comment: safe and unsafe commands
This commit is contained in:
parent
9b91ea425c
commit
b49364e4cc
1 changed files with 12 additions and 0 deletions
|
@ -0,0 +1,12 @@
|
||||||
|
[[!comment format=mdwn
|
||||||
|
username="http://joeyh.name/"
|
||||||
|
ip="4.152.108.183"
|
||||||
|
subject="safe and unsafe commands"
|
||||||
|
date="2013-02-19T02:55:13Z"
|
||||||
|
content="""
|
||||||
|
All git commands that do not change files in the work tee (and do not stage files from the work tree), are safe. I don't have a complete list; it includes `git log`, `git show`, `git diff`, `git commit` (but not -a or with a file as a parameter), `git branch`, `git fetch`, `git push`, `git grep`, `git status`, `git tag`, `git mv` (this one is somewhat surprising, but I've tested it and it's ok)
|
||||||
|
|
||||||
|
git commands that change files in the work tree will replace your data with dangling symlinks. This includes things like `git revert`, `git checkout`, `git merge`, `git pull`, `git reset`
|
||||||
|
|
||||||
|
git commands that stage files from the work tree will commit your data to git directly. This includes `git add`, `git commit -a`, and `git commit file`
|
||||||
|
"""]]
|
Loading…
Reference in a new issue