Difference between revisions of "Git status"

From wikieduonline
Jump to navigation Jump to search
Line 26: Line 26:
 
   
 
   
 
  nothing to commit, working tree clean
 
  nothing to commit, working tree clean
 +
 +
 +
git status
 +
On branch [[main]]
 +
Your branch is up to date with 'origin/main'.
 +
 +
Changes not staged for commit:
 +
  (use "git add <file>..." to update what will be committed)
 +
  (use "git restore <file>..." to discard changes in working directory)
 +
        modified:  MyModifiedFile.txt
 +
        modified:  MyOtherModifiedFile.txt
 +
 +
no changes added to commit (use "[[git add]]" and/or "[[git commit -a]]")
 +
  
 
  git status
 
  git status

Revision as of 15:33, 21 September 2021

git status

Steps: git add -> git commit -> git push
git status
On branch master 

No commits yet

Changes to be committed:
  (use "git rm --cached <file>..." to unstage)

	new file:   new_file_1.txt
	new file:   new_file_2.txt
	new file:   new_file_3.txt
git status
On branch master
nothing to commit, working tree clean
git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean


git status
On branch main
Your branch is up to date with 'origin/main'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   MyModifiedFile.txt
        modified:   MyOtherModifiedFile.txt

no changes added to commit (use "git add" and/or "git commit -a")


git status
fatal: not a git repository (or any of the parent directories): .git

Related terms

See also

Advertising: