giterror: 'yks-kd-app/' does not have a commit checked out fatal: adding files failed
时间: 2024-05-20 22:16:07 浏览: 12
This error message indicates that Git was unable to add files to the repository because it could not find a commit in the current branch.
To resolve this error, you can try the following steps:
1. Check if you are in the correct branch by running the command `git branch`. The current branch will be highlighted with an asterisk (*).
2. If you are not in the correct branch, switch to the correct branch by running the command `git checkout <branch-name>`.
3. If the correct branch does not exist, you can create a new branch by running the command `git checkout -b <new-branch-name>`.
4. Once you are in the correct branch, try adding the files again using the command `git add <file-name>`.
5. Finally, commit the changes by running the command `git commit -m "commit message"`.
If these steps do not resolve the error, you may need to provide more information about the specific context of the error to receive further assistance.
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![xlsx](https://img-home.csdnimg.cn/images/20210720083732.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![pptx](https://img-home.csdnimg.cn/images/20210720083543.png)