# Git crashed and lost all changes

**URL:** <https://forum.katalon.com/t/git-crashed-and-lost-all-changes/147985>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [September 26, 2024, 8:54am UTC](https://forum.katalon.com/t/git-crashed-and-lost-all-changes/147985 "2024-09-26T08:54:57Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![gsavva](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/gsavva/32/20464_2.png) [@gsavva](https://forum.katalon.com/u/gsavva)\
**Post date:** [September 26, 2024, 8:54am UTC](https://forum.katalon.com/t/git-crashed-and-lost-all-changes/147985/1 "2024-09-26T08:54:57Z")

</div>

Hello community,

I would really appreciate your help on this one.

In the last 4-5 days, a made huge changes. For example, created listeners, custom keywords, created plenty of test objects, created a custom logger etc. Yesterday I had an issue while committing to git, and today all my changes are gone.

Is there a way that I can recover at least the missing test case scripts, the keywords and the listener?

Thank you in advance

---

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/katalon/original/3X/d/5/d55596ab02785a255798e87ede769734747b30c4.svg) [@system](https://forum.katalon.com/u/system)\
**Post date:** [September 26, 2024, 8:54am UTC](https://forum.katalon.com/t/git-crashed-and-lost-all-changes/147985/2 "2024-09-26T08:54:57Z")

</div>

Hi there, 👋

Thank you very much for your topic! It may take a little while before Katalon team member or others forum members respond to you.

In the meantime, you can _double-check_ your post to see if you can add any extra information i.e. error logs, HTML codes, screenshots, etc. Check out **[this posting guide](http://forum.katalon.com/t/tip-how-to-help-us-help-you/12919)** to **help us help you better!**

Thanks! 🕶  
Katalon Community team

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [September 26, 2024, 9:16am UTC](https://forum.katalon.com/t/git-crashed-and-lost-all-changes/147985/3 "2024-09-26T09:16:27Z")

</div>

Git is a super-rubust software. Git has been used and tested by millions of programmers in the world. I don’t think Git caused any error to @gsavva .

> [@gsavva](#):
>
> all my changes are gone.

Did you carelessly delete the `.git` folder?

If YES, the only way is to restore the `.git` folder from some backup. If you do not have any backup, no way. Nobody can help you. All you should do is to forget the changes made in the past.

If the `.git` folder is still there, you would be able to find a way to restore your codes. But you haven’t described what you have now and what you have done. Unless provided concrete information, no one would be able to help you.

---

<div class="post-metadata">

**Author:** ![gsavva](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/gsavva/32/20464_2.png) [@gsavva](https://forum.katalon.com/u/gsavva)\
**Post date:** [September 26, 2024, 9:46am UTC](https://forum.katalon.com/t/git-crashed-and-lost-all-changes/147985/4 "2024-09-26T09:46:48Z")

</div>

Hello kazurayam and thank you for the quick reply,

Git crashed in katalon while while trying to move unstaged changes to index in order to commit.  
After that I was not able to execute any test suites, with the error:  
“An internal error occurred during: “Adding Files to Index”.  
Exception caught during execution of add command”.

So, while researching how to resolv this, I identified in .git folder, “index.lock” file which according to the guide that I found it had to be deleted (i did not delete this i moved it to another folder).

After the deletion, I managed to commit, without been able to see the unstaged changes, and after that my changes (including the nstaged changes ithat I initially tried to move to index), were lost.

Any help would be welcome 🙂

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [September 26, 2024, 9:48am UTC](https://forum.katalon.com/t/git-crashed-and-lost-all-changes/147985/5 "2024-09-26T09:48:31Z")

</div>

> [@gsavva](#):
>
> Git crashed in katalon

No. Your observation is possibly wrong. Git never crashes.

Katalon must have crashed while invoking Git.

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [September 26, 2024, 9:49am UTC](https://forum.katalon.com/t/git-crashed-and-lost-all-changes/147985/6 "2024-09-26T09:49:45Z")

</div>

Don’t you have any backup of what you modified?

Don’t you have a remote repository such as GitHub where you have pushed your local repository?

If not, no way to restore.

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [September 26, 2024, 9:57am UTC](https://forum.katalon.com/t/git-crashed-and-lost-all-changes/147985/7 "2024-09-26T09:57:04Z")

</div>

I would advise you 2 points for your future

1. use Command Line to execute the `git` command. Don’t use the Katalon-integrated Git menu, which could trouble you again
2. create a remote repository and continuously push the local repository into the remote. For example, GitHub. The remote repository is the safest storage.

When I am going to initiate a new project, I always start with creating a remote repository on GitHub. I mean, I will create a backup at the day 1 of the project. Secondly I will clone the repository from GitHub into my local machine. Thirdly I will get into the local repository = a directory and create a project; for example create a new Katalon project. Once I could make sure the new project is working, then I will push the project to the remote repository. While I carry out development tasks, I will push the local repository to the remote frequently for backup purpose. At least once a day; usually even more frequently.

---

<div class="post-metadata">

**Author:** ![gsavva](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/gsavva/32/20464_2.png) [@gsavva](https://forum.katalon.com/u/gsavva)\
**Post date:** [September 26, 2024, 10:42am UTC](https://forum.katalon.com/t/git-crashed-and-lost-all-changes/147985/8 "2024-09-26T10:42:43Z")

</div>

Thanks for your reply again @kazurayam I will use your suggestions for future cases,

Thankfully, I restored up to a point from temp files. will take it from there.
