Editing Git status

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
 
{{lowercase}}
 
{{lowercase}}
:<code>[[git]] status</code> https://git-scm.com/docs/git-status
+
<code>[[git]] status</code>
:<code>[[git status -v]]</code>
+
* https://git-scm.com/docs/git-status
:<code>[[git status -vvv]]</code>
 
  
 
  Steps: <code>[[git add]]</code> -> <code>[[git commit]]</code> -> <code>[[git push]]</code>
 
  Steps: <code>[[git add]]</code> -> <code>[[git commit]]</code> -> <code>[[git push]]</code>
 
== Examples ==
 
git status
 
On [[branch master]]
 
nothing to commit, working tree clean
 
 
[[git status -v]]
 
On branch your-branch
 
[[nothing to commit, working tree clean]]
 
 
 
  
 
  git status
 
  git status
Line 22: Line 10:
 
  No commits yet
 
  No commits yet
 
   
 
   
  [[Changes to be committed:]]
+
  Changes to be committed:
 
   (use "git rm --cached <file>..." to unstage)
 
   (use "git rm --cached <file>..." to unstage)
 
   
 
   
Line 29: Line 17:
 
  new file:  new_file_3.txt
 
  new file:  new_file_3.txt
  
 +
git status
 +
On [[branch master]]
 +
nothing to commit, working tree clean
  
 
  git status
 
  git status
Line 35: 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
 
  fatal: not a git repository (or any of the parent directories): .git
 
  fatal: not a git repository (or any of the parent directories): .git
 
[[git status]]
 
[[HEAD detached]] from origin/your-branch-name
 
[[nothing to commit, working tree clean]]
 
 
On branch feature/your-branch
 
Your branch is up to date with 'origin/feature/your-branch'.
 
 
[[Untracked files]]:
 
  (use "[[git add]] <file>..." to include in what will be committed)
 
../../path/path4/
 
 
[[nothing added to commit but untracked files present (use "git add" to track)]]
 
 
[[On branch main]]
 
Your branch is behind '[[origin/main]]' by 20 commits, and can be fast-forwarded.
 
  (use "git pull" to update your local branch)
 
 
git status             
 
On branch yourbranch
 
Your branch is up to date with 'origin/yourbranch'.
 
Changes to be committed:
 
  (use "git restore --staged <file>..." to unstage)
 
        modified:  main.tf
 
  
 
== Related terms ==
 
== Related terms ==
* <code>[[git diff]]</code>
 
 
* <code>[[git add]]</code>, <code>[[git commit]]</code>
 
* <code>[[git add]]</code>, <code>[[git commit]]</code>
 
* <code>[[git init]]</code>, <code>[[git remote]]</code>
 
* <code>[[git init]]</code>, <code>[[git remote]]</code>
 
* <code>[[Master]]</code>
 
* <code>[[Master]]</code>
* <code>[[git push]]</code>
 
* <code>[[git pull]]</code>
 
* https://stackoverflow.com/questions/tagged/git-status?tab=Votes
 
* <code>[[Changes not staged for commit:]]</code>
 
  
 
== See also ==
 
== See also ==
* {{git status}}
 
 
* {{git}}
 
* {{git}}
  
 
[[Category:Git]]
 
[[Category:Git]]

Please note that all contributions to wikieduonline may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Wikieduonline:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Templates used on this page:

Advertising: