mirror of
https://github.com/k88hudson/git-flight-rules.git
synced 2025-03-10 12:48:43 -03:00
added a section for unstaging a staged file. (#243)
I have accidentally staged many files in my working copy, and was looking for a way to unstage them by filename as I had some staged files that I wanted to keep. Didn't see anything that addressed my specific issue on the README, so thought of adding it here.
This commit is contained in:
parent
9e15db0d59
commit
ba88c82f94
12
README.md
12
README.md
@ -51,6 +51,7 @@ All commands should work for at least git version 2.13.0. See the [git website](
|
|||||||
- [I want to discard specific unstaged files](#i-want-to-discard-specific-unstaged-files)
|
- [I want to discard specific unstaged files](#i-want-to-discard-specific-unstaged-files)
|
||||||
- [I want to discard only my unstaged local changes](#i-want-to-discard-only-my-unstaged-local-changes)
|
- [I want to discard only my unstaged local changes](#i-want-to-discard-only-my-unstaged-local-changes)
|
||||||
- [I want to discard all of my untracked files](#i-want-to-discard-all-of-my-untracked-files)
|
- [I want to discard all of my untracked files](#i-want-to-discard-all-of-my-untracked-files)
|
||||||
|
- [I want to unstage a specific staged file](#i-want-to-unstage-a-specific-staged-file)
|
||||||
- [Branches](#branches)
|
- [Branches](#branches)
|
||||||
- [I want to list all branches](#i-want-to-list-all-branches)
|
- [I want to list all branches](#i-want-to-list-all-branches)
|
||||||
- [Create a branch from a commit](#create-a-branch-from-a-commit)
|
- [Create a branch from a commit](#create-a-branch-from-a-commit)
|
||||||
@ -512,6 +513,17 @@ When you want to get rid of all of your untracked files
|
|||||||
$ git clean -f
|
$ git clean -f
|
||||||
```
|
```
|
||||||
|
|
||||||
|
<a href="I-want-to-unstage-specific-staged-file"></a>
|
||||||
|
### I want to unstage a specific staged file
|
||||||
|
|
||||||
|
Sometimes we have one or more files that accidentally ended up being staged, and these files have not been committed before. To unstage them:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$ git reset -- <filename>
|
||||||
|
```
|
||||||
|
|
||||||
|
This results in unstaging the file and make it look like it's untracked.
|
||||||
|
|
||||||
## Branches
|
## Branches
|
||||||
|
|
||||||
### I want to list all branches
|
### I want to list all branches
|
||||||
|
Loading…
x
Reference in New Issue
Block a user