Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commit failed - exit code 1 received #4432

Closed
Deanang opened this issue Apr 11, 2018 · 24 comments
Closed

Commit failed - exit code 1 received #4432

Deanang opened this issue Apr 11, 2018 · 24 comments
Labels
more-info-needed The submitter needs to provide more information about the issue

Comments

@Deanang
Copy link

Deanang commented Apr 11, 2018

From GitHub Desktop Team if others come upon this issue:

Some users have run into this error due to having nested .git directories. Please try searching your repository to see if you have multiple .git directories.

@shiftkey
Copy link
Member

@Deanang thanks for reaching out!

We require the template to be filled out on all new issues. We do this so that we can be certain we have all the information we need to address your submission efficiently. This allows the maintainers to spend more time fixing bugs, implementing enhancements, and reviewing and merging pull requests.

Thanks for understanding and meeting us half way 😀

@shiftkey shiftkey added the more-info-needed The submitter needs to provide more information about the issue label Apr 11, 2018
@steveward
Copy link
Member

@Deanang some users have run into this error due to having nested .git directories. Can you try searching your repository to see if you have multiple .git directories?

@shiftkey
Copy link
Member

Closing as inactive. I gather the 👍 on @steveward's comment indicates it's the same issue, and if you haven't found a workaround then please provide more details and we can revisit this.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 17, 2018
@desktop desktop unlocked this conversation Sep 27, 2018
@kunisettykumar
Copy link

Perfect. My issue also got resolved.

@adelra
Copy link

adelra commented Dec 18, 2018

Perfect. My issue also got resolved.

How was your issue resolved?

@steveward
Copy link
Member

@adelra are you also encountering this issue? Is it possible you have nested .git directories?

@adelra
Copy link

adelra commented Dec 19, 2018

Yes, Indeed the problem was due to .git somewhere in my directories.
I can confirm that the solution is what @steveward explained, i.e. nested .git

@Spreeuw
Copy link

Spreeuw commented Jan 25, 2019

I had this very same error without nested .git folders, but it turned out that while I was committing the changes, some of them had been undone in the background

@jlangvad
Copy link

I solved this by checking git status in terminal.

@robbiegod
Copy link

I got this error message too. Here is why. I had downloaded some files that hadn't changed locally. In github desktop it showed a list of files all marked "no change". I was trying create a commit because i didn't notice there file change status. A few minutes later they just disappeared from the list. Basically, what it boild down too is you need to some file with some changes otherwise you will get this error. Thanks!

@douglasrcjames
Copy link

I just ran into this error while using the Github Windows 10 desktop app. I was trying to remove folders I meant to gitignore from the repo. I followed the guide below to just use command line and it worked!
(https://github.community/t5/How-to-use-Git-and-GitHub/How-to-delete-multiples-files-in-Github/td-p/4623)

@jackdolgin
Copy link

I don't know if this will work for others but I found just restarting Github Desktop and quitting out of Atom (where my committed changes were coming from) did the trick!

@ipkpjersi
Copy link

Since a lot of people seem to have run into this problem because of having multiple nested .git directories (myself included), perhaps a warning about checking this should be added to the exit code 1 message?

@steveward
Copy link
Member

@ipkpjersi thanks for the feedback. Providing better error messaging is definitely something that is always on our minds (see #7649 for an example). The exit code 1 error can be thrown in a variety of situations, so we would need to somehow check specific scenarios in order to return a more verbose error message. I'm going to make a note to add this to the known-issues document for referencing.

hahyeonsook added a commit to hahyeonsook/webmail-system that referenced this issue Sep 25, 2019
error commit failed-exit 1code receive
desktop/desktop#4432

.git 파일이 여러개
@RickSeta
Copy link

I don't know if this was your case, but i was trying to commit from a cloned repository to a rep that i didn't have permit. Then i forked the rep, commited to it, then i made a pull request and it worked.

@minhkhai1992
Copy link

I used GitHub Desktop and I got the same yours guys problems.
my solution that I got "Add local repository" and find a folder where project located and add and submit.

My respective : they don't want folder over another folder . it mean they only want 1 folder and the rest of files will be locate in the folder.

@zq-Aux
Copy link

zq-Aux commented Mar 27, 2020

If anyone still has this issue and nested .git folders are not the cause, check out this thread for another possible solution

@Harris-Logic
Copy link

even in the child folder, i had an unknown .git directory. might been wrong created sometimes.

@29er
Copy link

29er commented Aug 4, 2020

turned out some other git process was 'corrupted' for me . I had to delete a .git/index file and it worked.

@luquibotbol
Copy link

If you have 2 or more README.md it'll give you an error message

@Valeka
Copy link

Valeka commented Aug 15, 2020

I got this error message too. Here is why. I had downloaded some files that hadn't changed locally. In github desktop it showed a list of files all marked "no change". I was trying create a commit because i didn't notice there file change status. A few minutes later they just disappeared from the list. Basically, what it boild down too is you need to some file with some changes otherwise you will get this error. Thanks!

The same thing happened to me and I'm not sure how to solve it or should just ignore it. So the same error meesage but there was no duplicated .git folder. When I copy updated files (wordpress plugins updated) and commit changes I received error and later I've found that I already uploaded these files.

I deleted repository and created new and the same thing happened. Is there any way I can solve it?

@tierninho
Copy link
Contributor

@Valeka Thanks for the note. Please submit a new issue if you'd like us to assist you.

@jesulesvf

This comment has been minimized.

@wigllytest
Copy link

wigllytest commented Aug 22, 2020

The issue is resolved/workaround when you delete the .git file in your nested folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more-info-needed The submitter needs to provide more information about the issue
Projects
None yet
Development

No branches or pull requests