M
M
Maybe_V2016-08-18 16:04:49
git
Maybe_V, 2016-08-18 16:04:49

How can I change the first commit?

In the first commit, I forgot to put the files in gitignore, now it's the 20th commit.
How can I get out of the situation so that I can push a branch to the repository without unnecessary files?
What could be the solution for this?
Is it possible to change the first commit and so that those that came after it were already without extra files?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
Lynn "Coffee Man", 2016-08-18
@Lynn

I understand that you need this https://help.github.com/articles/remove-sensitive-data/

M
Mikhail Osher, 2016-08-18
@miraage

Remove files from git index (git rm --cached).
Add them to .gitignore.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question