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
0
votes
0 answers

Did I just lose every change I ever made in git?

I was working on a project last night and committing all my changes but NOT checking them in to the repo, which is my bad. However this morning I had a small issue with object file is empty and followed the steps in the answer (deleting the damaged…
TheWebs
  • 12,470
  • 30
  • 107
  • 211
0
votes
1 answer

The command git status result message not showing modified file in console

I'm new to git. I was going through an exercise and noticed something strange happening. The modified line is not showing in the console when I tried to check the status. It looks like this on my screen: # On branch master # Changes not staged for…
CrCat
  • 1
0
votes
1 answer

machine parsable method of comparing the current branch to the local view of the tracking branch

I need a machine parsable way of comparing the current branch to the local copy of the tracking branch. These are the ideas I've tried, with their caveats: git status: not guaranteed to stay the same between different versions of git git status…
Sparky
  • 2,694
  • 3
  • 21
  • 31
0
votes
0 answers

Git-status, partial folder report

Is there a way to tell git-status to ignore the contents of specific folders when invoked from outside of these folders? I would like to see the changes I made in these folders only when I enter them and call git-status. If possible I would like to…
Xyand
  • 4,470
  • 4
  • 36
  • 63
-1
votes
1 answer

Why does git clone not copy remote branch and give error message when git status? problem with upstream?

I just created my own github page which is finalexam96.github.io On Visual Studio Code, I did git clone https://github.com/finalexam96/finalexam96.github.io.git I created an index.html file committed everything and it worked. But when I try to…
-1
votes
2 answers

git checkout master does not work after i created a branch....what can I do?

I have created a file called basic and I have created a branch called new. After moving to the new branch, I want to switch to the master branch, hence i used git checkout master. Unfortunately, the terminal stated there is no master branch. (base)…
Dun Yann
  • 31
  • 2
-1
votes
1 answer

How to remove local untracked files from the current Git branch using Windows Command prompt

:git status On branch main Your branch is up to date with 'origin/main'. Untracked files: (use "git add ..." to include in what will be…
-1
votes
1 answer

.vs showing as untracked file in git bash - what do i do?

I have recently cloned a repo from git and havn't yet made any changes, all I have done is open the code up in VS19. In git bash i typed 'git status' and there is an untracked file im not sure what to do with. Can anyone suggest please? $ git…
Reeves62
  • 139
  • 1
  • 3
  • 13
-1
votes
1 answer

get the action has been performed for particular commit in git

In my local git repository,i have more than one commits for a file. How can i get status/action has been performed on that commit.I mean, how can i know on a particular commit,is that file added newly or is it been modified or is it been labeled..i…
-1
votes
1 answer

git merge in branch in which directory that I created new files in has been moved

I want to merge in a branch in which a directory has been moved, and I have added files in this directory in my branch. However, when I tried to do this, the new files in my branch were not moved to the new directory. I am not sure whether this is…
Robin Green
  • 32,079
  • 16
  • 104
  • 187
-1
votes
1 answer

Doing a commit in github

Actually i am a beginner in using github. so here is my question.when i try to show commits in github i have a problem,so before adding the modification when i run git status i not only get the modifications inside the file as changes modified but…
slo-loris
  • 23
  • 6
-2
votes
1 answer

Git: some changes weren't reversed by `git reset --hard HEAD`

I made changes in my project, then did git reset --hard HEAD, but I notice that some of the changes are still present. When I run git status I get Your branch is behind '' by 1 commit, and can be fast-forwarded. Can anyone explain this…
gkeenley
  • 6,088
  • 8
  • 54
  • 129
-2
votes
3 answers

How to restore files after deletion from git file?

I work on a project and I have a problem on my mac. After merging my branch into the main branch by the supervisor I pulled the git project with § git pull After that I did § git status and I recognized that there is a new file named ".DS_Store" As…
-2
votes
2 answers

Check for uncommitted changes in another branch x, without checking out branch x

I want to determine if another branch has uncommitted changes, but I don't want to check that branch out. Basically I want to find out if another branch has a "dirty index". This means either staged or unstaged changes that are uncommitted. Is this…
user5047085
1 2 3
13
14