Featured post
- Get link
- X
- Other Apps
Error: Command failed: git status -s fatal: not a git repository (or any of the parent directories): .git
Hi,
not a git repository (or any of the parent directories) error |
I was working in react native project but my react native project was in an old version of react native.So i planned to update my react native version to latest as of now latest version is 0.71.I found the command to upgrade version.I will share the command with you.
npx react-native upgrade
When i excuted the command it started to work but immediately ,i got the error
info No version passed. Fetching latest...
info Fetching diff between v0.64.2 and v0.71.6...
error Command failed: git status -s
fatal: not a git repository (or any of the parent directories): .git
.
Error: Command failed: git status -s
fatal: not a git repository (or any of the parent directories): .git
at makeError (D:\Trivia\FrontEnd\node_modules\execa\index.js:174:9)
at D:\Trivia\FrontEnd\node_modules\execa\index.js:278:16
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.upgrade [as func] (D:\Trivia\FrontEnd\node_modules\react-native\node_modules\@react-native-community\cli\build\commands\upgrade\upgrade.js:340:9)
at async Command.handleAction (D:\Trivia\FrontEnd\node_modules\react-native\node_modules\@react-native-community\cli\build\index.js:186:9)
info Run CLI with --verbose flag for more details.
So i decided to solve the issue.In order to solve the issue I studied about the error and decided to make my as a local git repository.So i decided to run the command to make my project folder as local git repository.Actually i don't want push my project code to git hub.So i didn't already make project as git repository.Due to this error,i changed my mind and decided to make project sourced code in a local git repository
I used below command
git init
Make project directory as a local git repository |
Then i tried to upgrade react native version.It updated to latest version without error Command failed: git status -s fatal: not a git repository (or any of the parent directories): .git
Thanks
Popular Posts
How to Check React Version Installed in Your System by Checking PACKAGE.JSON File and Executing Command from COMMAND PROMPT
- Get link
- X
- Other Apps
Execution failed for task ':react-native-reanimated:externalNativeBuildDebug' solved
- Get link
- X
- Other Apps
Error: Invalid `prisma.$executeRaw()` invocation: fixed using log: ["query"] option
- Get link
- X
- Other Apps
app keeps stopping error solved in android studio emulator using logcat in react native project
- Get link
- X
- Other Apps
ERROR Warning: React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined
- Get link
- X
- Other Apps