Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git-stage: add page #3963

Merged
merged 4 commits into from
Apr 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pages/common/git-add.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@
- Interactively stage parts of a given file:

`git add -p {{path/to/file}}`

- Interactively stage a file:

`git add -i`
33 changes: 33 additions & 0 deletions pages/common/git-stage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# git stage

> Add file contents to the staging area.
> Synonym of `git add`.
> More information: <https://git-scm.com/docs/git-stage>.

- Add a file to the index:

`git stage {{path/to/file}}`

- Add all files (tracked and untracked):

`git stage -A`

- Only add already tracked files:

`git stage -u`

- Also add ignored files:

`git stage -f`

- Interactively stage parts of files:

`git stage -p`

- Interactively stage parts of a given file:

`git stage -p {{path/to/file}}`

- Interactively stage a file:

`git stage -i`