From 97140915972c124cf061c5352eaec3bfce0bc81a Mon Sep 17 00:00:00 2001 From: cranbim Date: Wed, 31 Jan 2018 20:43:14 +0000 Subject: [PATCH 1/2] answered the question about REVERT --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 47c329b..c63c139 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ If you have any other questions not listed here, please raise a PR to have it ad - Q: How can I `add` only parts of a file I've changed? - Q: How can I __revert__ a commit? +It looks like git revert HEAD will undo the last commit but then commit the last changes as a new commit. The previous commits (both before and after the last commit) are still in the history. I think!!! - Q: I keep accidentally adding files I don't want to commit (e.g. compiled code, files with passwords etc.), how can I __ignore__ these files? From a6ae63fd499ca977b61611c6d939be5302b935a3 Mon Sep 17 00:00:00 2001 From: cranbim Date: Wed, 31 Jan 2018 20:52:03 +0000 Subject: [PATCH 2/2] added code backticks --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c63c139..1df5d3e 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ If you have any other questions not listed here, please raise a PR to have it ad - Q: How can I `add` only parts of a file I've changed? - Q: How can I __revert__ a commit? -It looks like git revert HEAD will undo the last commit but then commit the last changes as a new commit. The previous commits (both before and after the last commit) are still in the history. I think!!! +It looks like ```git revert HEAD``` will undo the last commit but then commit the last changes as a new commit. The previous commits (both before and after the last commit) are still in the history. I think!!! - Q: I keep accidentally adding files I don't want to commit (e.g. compiled code, files with passwords etc.), how can I __ignore__ these files?