Editing Pathspec

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 11: Line 11:
  
 
  [[git checkout]] main
 
  [[git checkout]] main
  error: pathspec 'main' [[did not match any file(s) known to git]]
+
  error: pathspec 'main' did not match any file(s) known to git
  
[[git checkout -m]] "my first branch"
 
error: pathspec 'my first branch' did not match any file(s) known to git
 
  
[[git checkout]] your-branch
+
==See also==
Note: switching to 'remotes/origin/your-branch'.
+
*{{git}}
 
You are in '[[detached HEAD]]' state. You can look around, make experimental
 
changes and commit them, and you can discard any commits you make in this
 
state without impacting any branches by switching back to a branch.
 
 
If you want to create a new branch to retain commits you create, you may
 
do so (now or later) by using -c with the switch command. Example:
 
 
  git switch -c <new-branch-name>
 
 
Or undo this operation with:
 
 
  git switch -
 
 
Turn off this advice by setting config variable [[advice.detachedHead]] to false
 
 
[[HEAD]] is now at 7caef6a60 Add doc
 
 
 
== Related ==
 
* <code>[[refname]]</code>
 
 
 
== See also ==
 
* {{git checkout}}
 
* {{pathspec}}
 
  
 
[[Category:Computer]]
 
[[Category:Computer]]

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)

Advertising: