Questions tagged [git-stage]

Git staging area or Git index is a list of files that will go to the next commit. Use this tag for questions about problems and operations with the staging area.

The staging area is a file, generally contained in your Git directory, that stores information about what will go into your next commit. It’s sometimes referred to as the “index”, but it’s also common to refer to it as the staging area. (from Pro Git)

Files are staged (indexed) with , or and removed from stage with . Actual contents of the staging area can be shown with .

Recommended questions:

three main sections of a Git project

99 questions
0
votes
1 answer

git reset resulting in changes to both working directory and stage

I have a commit with many files in it. One of the files in the commit has several changes, one of which I would like to undo. So, I was thinking I could reset that particular file back to HEAD~ leaving the outstanding changes I had made in the…
Jonathan.Brink
  • 23,757
  • 20
  • 73
  • 115
0
votes
1 answer

Git track untracked files without adding to commit

I ran the command "git reset", but my unstaged changes were put into folders instead. I get something like the following after running git status: Changes not staged for commit: (use "git add ..." to update what will be committed) (use…
0
votes
1 answer

Git and add -p problems

I have just applied a patch to 3 files, their diff can be seen here: stack.h, stack.c and main.c. The task is to separate the patch into various commits, like comments, license, refactoring etc. For that I will use git add -p: First hunk is license…
0
votes
1 answer

Some doubts about how correctly compare the staging area content with the last commit using GIT?

I am pretty new in GIT and I have the following doubt about the correct use of the git diff --staged that should compare the staging area content with the last commit. So I obtain this output: $ git diff --staged diff --git a/game.js b/game.js index…
AndreaNobili
  • 40,955
  • 107
  • 324
  • 596
0
votes
1 answer

VSCode Stage Selected Lines is greyed out with changes highlighted

I have switched over to Changes View and I can see the changed line in green with the old line in red. Selected text I only want to stage some of these for a commit so I've highlighted the lines in green that I want to stage but the Stage Selected…
danielr
  • 130
  • 1
  • 8
0
votes
0 answers

Did a git stash - had unstaged changes, is there a way to reverse that?

i did a git stash and had some changes that were not added to the index, when i did a git stash apply, they were not reapplied. Is there a way to get back from this? Thanks and kind regards
user871784
  • 1,247
  • 4
  • 13
  • 32
0
votes
1 answer

how to remove untrack changes but keeping indexed changes

in my git status I see this Changes to be committed: (use "git reset HEAD ..." to unstage) modified: file1 modified: file2 modified: file4 Changes not staged for commit: (use "git add ..." to update what will be committed) (use…
user2167582
  • 5,986
  • 13
  • 64
  • 121
0
votes
1 answer

How to see all edited files of perticular Version ID in eclipse

I wanted to see all lastly committed files of specific version ID. I'm using git repository and eclipse Kepler. e.g. I have some.jspx file of version ID 'xyznumber', I wanted to see all the files who got committed with this same version ID.
knowledge flow
  • 193
  • 4
  • 16
-1
votes
2 answers

Is there any way to undo a "`git reset .`"? It 'reverted' all files - all edits have been lost from my working directory

I staged a grand number of files for commit. Then I realized it was better to commit only two of the files, and then commit the remaining ones in a separate commit. git reset unstages filename I wanted to unstage everything, then restage…
SherylHohman
  • 16,580
  • 17
  • 88
  • 94
1 2 3 4 5 6
7