Add getting an older version of a file
[git-cheat-sheet.git] / README.md
index 3dbce00..f23a068 100644 (file)
--- a/README.md
+++ b/README.md
@@ -52,3 +52,22 @@ git commit --allow-empty -m $INIT_COMMIT_MSG
 git rebase --onto $TEMP_BRANCH --root $MAIN_BRANCH
 git branch -d $TEMP_BRANCH
 ```
+
+
+Deleting all tags, locally and remotely
+---------------------------------------
+```sh
+for tag in `git tag`;
+do
+    git tag -d $tag
+    git push $REMOTE_NAME :refs/tags/$tag
+done
+```
+
+
+Get an older version of a file
+------------------------------
+
+```sh
+git cat-file -p $COMMIT_DIGEST:$FILE_PATH
+```
This page took 0.02201 seconds and 4 git commands to generate.