From 4a89abf3f2ad1c1a8f7bca505e76edf478a46ac9 Mon Sep 17 00:00:00 2001 From: Ish Date: Sun, 28 Feb 2021 16:20:59 -0500 Subject: [PATCH 1/2] removed add . --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9ec9474426..f94d54b591 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -226,11 +226,11 @@ c) Prepare your changes to push to your repository Once you are done with the work on your issue you will push it to your repository. Before you can push your work to your repository, you will stage and commit your changes. These two commands are similar to the save command that you have used to in other programs. -Use the `git add` command to stage your changes. -This command prepares your changes before you commit them. You can stage files one at a time using the filename, or you can use the `.` to stage all of the files that you have added or made changes to. +This command prepares your changes before you commit them. You can stage files one at a time using the filename. Run the command: ```bash -git add . +git add “filename.ext” ``` -Use the `git status` command to see what files are staged. From 881ad8416fc60135023598da3fbd49493d5a591b Mon Sep 17 00:00:00 2001 From: Ish Date: Sun, 28 Feb 2021 16:34:36 -0500 Subject: [PATCH 2/2] added the text to remove a staged file --- CONTRIBUTING.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f94d54b591..2baf885052 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -236,9 +236,16 @@ git add “filename.ext” -Use the `git status` command to see what files are staged. This command will list the files that have been staged. These are the files that will be committed (saved) when you run the next command, `git commit`. Please be sure all your staged changes are relevant to the issue you are working on. If you find you have included unrelated changes, please unstage them before making this commit - and then make a new commit for the unrelated changes. (The commands for unstaging commits are provided in the output of your `git status` command.) + ```bash git status ``` +-Use the `git reset HEAD` command to remove a staged file. + +This command will remove a file that has been staged. This file will not be committed (saved) when you run the next command, `git commit`. This only works if the wrong files were added, but they were not yet committed. The file will be removed from the staging area, but not actually deleted: +```bash +git reset HEAD “filename.ext” +``` -Use the `git commit` command