Junior — Middle
What is the role of the 'git stage' command in version control workflows?
sobes.tech AI
Answer from AI
In Git, the command git stage is not standard. Usually, to add changes to the index (staging area), the command git add is used. The index is a temporary area where changes are placed before committing. Therefore, the role of a command similar to "stage" is to prepare specific changes for the subsequent commit.
Example:
git add file.txt
This will add the file's changes to the index, after which you can execute git commit to save the changes to the repository.