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
6
votes
1 answer

Git status says up-to-date with remote even though it's not

We have a Git repository hosted on a shared network drive that multiple co-workers access. I'll call this the "central repository". Employees clone this repository to their local machines, make changes, and then push changes back up. We've noticed…
Jake Wilson
  • 88,616
  • 93
  • 252
  • 370
6
votes
1 answer

How to force git-status to check differences using hashes?

git-status is known to find out that the object has changed via checking its size and modification time. Sometimes it is not working, e.g. for repos on restrictive filesystems, etc. How to force git-status to check the actual differences via…
6
votes
1 answer

What does it mean when git only shows a directory containing untracked files, but not the files themselves?

Relative newbie to git, so this may be something pretty basic. On the other hand, I searched around quite a bit for this answer before asking. In my git repository, if I create any files in a particular subdirectory (a few levels down from the main…
Wilson F
  • 1,250
  • 1
  • 20
  • 37
6
votes
1 answer

git status show files between ""

I made git status command and get this: # "public/images/wallpaper/wait/1920\321\2051080.jpg" # public/style.css Why some files are between quotes? And how I can add to .gitignore them?
Alex Antonov
  • 14,134
  • 7
  • 65
  • 142
6
votes
1 answer

Git Status does not show 'ahead of' after edit and commit to local repo

Our company's workflow is to clone master branch into a _Test branch as we work on new features and we continually push/share this _Test branch until a set of features are complete and approved by client, then we merge to master branch and build and…
Terry
  • 2,148
  • 2
  • 32
  • 53
5
votes
3 answers

Strange problem with git repo?

I just upgraded to OSX Lion on my Mac and I aquired a strange problem with a git repo. I have my .vim files under version control with a number of plugins configured as git submodules. After upgrading, I ran a git status command into my .vim…
drbunsen
  • 10,139
  • 21
  • 66
  • 94
5
votes
1 answer

What do characters like !1 at the end of my Powerlevel10k prompt mean?

I'm using Oh My Zsh with the Powerlevel10k theme. I've installed the recommended fonts directly from the Powerlevel10k docs, updated the settings for fonts in Terminal, iTerm2, and VS Code according to the docs, and it mostly works, except that…
Sarah
  • 90
  • 1
  • 8
5
votes
1 answer

Git status compared to different remote

A similar question has already been asked here, but I think it got misunderstood (or maybe I misunderstood the question). So let me ask it clearly here. When I do git status, I get (among other stuff) a line telling me whether or not I am behind of…
bartgol
  • 1,703
  • 2
  • 20
  • 30
5
votes
1 answer

When running git status the message "your branch is up-to-date with 'origin/branch' only appears some times

I have a repository with a number of branches. All the branches are up to date with the equivalent remote branch. For example see the output from git status and git log for the following two branches: Branch mantis_0074 mchaleg@ELT-L-0018…
gerard
  • 835
  • 11
  • 27
5
votes
1 answer

Can anyone explain, why "git status" touches the .git directory?

I currently maintain a project for a git-prompt for bash (https://github.com/magicmonty/bash-git-prompt) and I just got a bug report (https://github.com/magicmonty/bash-git-prompt/issues/97) from someone who works with Docker, who tells me, that…
magicmonty
  • 88
  • 6
5
votes
3 answers

git status: how to ignore some changes

Is there a way to have git status ignore certain changes within a file? Background I have some files in my repository that are auto-generated (yes, I know that's typically not recommended, but I have no power to change this). Whenever I build my…
Mr Fooz
  • 109,094
  • 6
  • 73
  • 101
5
votes
1 answer

Describe the Git symbols

I have started to use Git because I consider it is a better revision controller. Could someone help me to understand what git status -s symbols means?
vgonisanz
  • 11,831
  • 13
  • 78
  • 130
5
votes
1 answer

How can I make git list all changed files of a certain type in a specific path for a specific bug?

I would like to know how to make git list all changed files of a certain type (e.g. all php files) filed under a certain bug no. or which are still uncommitted and are in a specific path I'll start with laying out an example situation for my…
Iljaas
  • 520
  • 2
  • 12
4
votes
2 answers

git status to ignore newline and whitespace changes

I am currently maintaining my notes in markdown files, but the editor I use(marktext) adds new empty lines if I open an existing file. This addition of new empty lines get tracked by git and git keeps showing me these files as a modified files. Is…
Shrijit Basak
  • 307
  • 1
  • 13
4
votes
2 answers

How to prevent Git pull from deleting local files

Couldn't find my problem so I figured I would ask. Myself and another person is working on this repo. My local clone is up to date. My partner deletes a file 'example.txt', commits and pushes it up. I come in the next day, do a git status…