# Git ile tum commit gecmisini temizleme ve sifirdan yeni commit ile pushlamak

![](https://i.imgur.com/q7bAGN9.png)

```bash
# Deleting all commit history in your Git repository

# Navigate to your Git repository
cd path/to/your/repo

# Checkout to a new branch
git checkout --orphan temp_branch

# Add all files to the new branch
git add -A

# Commit all files
git commit -am "Initial commit"

# Delete the main branch
git branch -D main

# Rename the temporary branch to main
git branch -m main

# Force push to update the remote repository
git push -f origin main
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.yemreak.com/arsiv/programming/git-ile-tum-commit-gecmisini-temizleme-ve-sifirdan-yeni-commit-ile-pushlamak.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
