diff --git a/pages/common/git-add.md b/pages/common/git-add.md index c97059f89ac758..910d0c6a210e01 100644 --- a/pages/common/git-add.md +++ b/pages/common/git-add.md @@ -26,3 +26,7 @@ - Interactively stage parts of a given file: `git add -p {{path/to/file}}` + +- Interactively stage a file: + +`git add -i` diff --git a/pages/common/git-stage.md b/pages/common/git-stage.md new file mode 100644 index 00000000000000..9f3e301861c8b0 --- /dev/null +++ b/pages/common/git-stage.md @@ -0,0 +1,33 @@ +# git stage + +> Add file contents to the staging area. +> Synonym of `git add`. +> More information: . + +- 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`