From 0a582a1468700b859110be50bc3240ef1f80c67e Mon Sep 17 00:00:00 2001 From: "http://joeyh.name/" Date: Tue, 19 Feb 2013 02:55:14 +0000 Subject: Added a comment: safe and unsafe commands --- .../comment_2_7f7086b34ed136851963f145868a1d23._comment | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 doc/direct_mode/comment_2_7f7086b34ed136851963f145868a1d23._comment (limited to 'doc/direct_mode/comment_2_7f7086b34ed136851963f145868a1d23._comment') diff --git a/doc/direct_mode/comment_2_7f7086b34ed136851963f145868a1d23._comment b/doc/direct_mode/comment_2_7f7086b34ed136851963f145868a1d23._comment new file mode 100644 index 000000000..ddabee7e3 --- /dev/null +++ b/doc/direct_mode/comment_2_7f7086b34ed136851963f145868a1d23._comment @@ -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` +"""]] -- cgit v1.2.3