Questions tagged [git-status]

Shows which files in a Git repository have been modified and/or staged and what state they are in since the last commit

This is the main tool in to see the status of the files on the stage and what state they are in.

Running this command will tell you what tracked files have been added, deleted or modified since the last commit.

On a fresh repo or branch, you should see the following:

$ git status
# On branch master
nothing to commit (working directory clean)

See also

References

197 questions
1
vote
3 answers

What is the use of "git checkout -f" when "git status" shows tracked file changes on all branch

I have a tracked file (an old versioned file) that i modified on master branch. The staus on master branch shows this file as modified but The status on the topic branch also shows this file as modified. Earlier there was an error "error: You have…
Senthil A Kumar
  • 10,306
  • 15
  • 44
  • 55
1
vote
1 answer

PhpStorm Git integrated vs commandline

Files committed via PhpStorm's integrated Git handling still show as modified when viewed with commandline git status. They still push successfully to the remote on GitLab.
Punksta
  • 1
  • 2
1
vote
0 answers

`git status` prints way too much whitespace before each file

I'm sorry if this problem is phrased somewhat strange, but I am kind of lost here and don't even know how to google this issue. Running git status prints the usual list of modified files, but it adds so much whitespace before each file that only the…
Gileos
  • 113
  • 6
1
vote
1 answer

ClearCase equivalent of git status

With git (and other revision control apps like mercurial), you have a "status" functionality for a repository, which lists the repo files which are Modified, Deleted, Moved, Added or Missing. How do we achieve the same in ClearCase (relative to the…
einpoklum
  • 118,144
  • 57
  • 340
  • 684
1
vote
1 answer

Committing impossible due to unmerged files with git submodules

We have a repo with a bunch of submodules and we are currently working on a develop branch. Starting from the same common commit, two developers, A and B, made some changes to some files (unimportant here I think) and added a new revision of one of…
godo
  • 195
  • 1
  • 11
1
vote
2 answers

git status still says “Your branch is ahead of by N commits.” after git rebase

Suppose I have a my-topic-branch branch that is branched off my local master branch, and that master branch is tied to the remote master branch. The my-topic-branch branch was originally created off of a tag called tag1. tag1 is a tag layed down on…
bgoodr
  • 2,744
  • 1
  • 30
  • 51
1
vote
2 answers

Git fetch not pulling changes when using URL

I'm trying to set up a service that will update my repository automatically when it detects changes on the remote branch. Before anyone mentions it, I'm aware that embedding the password in the URL is bad practice. I'm currently using: git fetch…
user2437443
  • 2,067
  • 4
  • 23
  • 38
1
vote
1 answer

Rest API for getting "git status" command output

Does git provide a REST API for fetching the output of the gits status command. I looked up the https://developer.github.com/v3/ but couldn't find what I am looking for. I want to get all the text output that gets displayed when we type in the git…
Asif Kamran Malick
  • 2,409
  • 3
  • 25
  • 47
1
vote
1 answer

How do I get a terminal to display colors on CentOS 7 when viewing Git changes.? This is not Git Bash this is just a terminal window

Can someone direct me to how I can get the color coding option in CentOS for Git? Is there a specific version that is needed to get this color coding highlight when under the terminal (either terminal or the built-in IntelliJ Terminal? I had it…
edjm
  • 4,830
  • 7
  • 36
  • 65
1
vote
1 answer

Prefix Git Status File Path with particular string

I do git status --short at the root (of the Repository), and it lists the file path relative to the root like as follows: M NumericalProgramming1Src/FloatingPointNumber.md M NumericalProgramming1Src/NumericalProgramming.md I want to prefix all the…
Porcupine
  • 5,885
  • 2
  • 19
  • 28
1
vote
0 answers

Ignore mode changes with git status

Is there a way to run git status while ignoring mode file changes? Seems like there's a way to do it for git diff (git diff -G.): https://stackoverflow.com/a/22389011 but I can't seem to find a way to do this for status
tr33hous
  • 1,622
  • 1
  • 15
  • 26
1
vote
2 answers

Is there a git hook that runs immediately after detecting a modified file?

Let's say after git pull-ing-or-git clone-ing, Juan edited a single file called hello-world.txt. Is there a git hook that runs immediately after the modification of the said file?
Abel Callejo
  • 13,779
  • 10
  • 69
  • 84
1
vote
1 answer

Git not seeing files in folders in newly initiated repo. Is it normal?

I have an existing folder containing a hole hierarchy of subfolders, some of them containing files. I cd into this folder, and then do git init .. If I immediately do git status, only the direct entries in the directory appear, not their…
bli
  • 7,549
  • 7
  • 48
  • 94
1
vote
2 answers

What does the space in front of a few file names mean on doing git status -s?

When I do git status -s I get the following output: M package.json D public/ewew.js M script.sh M src/TaskList.js D test.js AD test2.js What does the space in the beginning of few lines mean? (1st, 3rd and 5th line)
Steric
  • 386
  • 4
  • 12
1
vote
1 answer

How can I recover a broken Git workspace?

My configuration is with Win10, latest Git 2.10 and I work with GitHUB using SourceTree. For SourceTree, it uses the Git version of my system (not the embedded one). Apparently a couple of files of 2Mb size (yes I double checked it), pop-up a…
notNullGothik
  • 432
  • 5
  • 20