2

I have a private Github repo, in which I was using .env file. Now I want to make the repo public and I created a commit with removing the .env file so my commit history looks like:

my-repo [master●] % git log --oneline
71846d4 Remove env file.
0e28737 Add README file with some assets
f1f672a Stop tracking .env file

Now since I removed the .env content, the modifications still can be seen by checking 71846d4 commit.

Is there anyway I can just remove the commit so we won't be seeing the content of the changes there?

Eki Eqbal
  • 5,779
  • 9
  • 47
  • 81
  • https://stackoverflow.com/questions/495345/how-to-remove-selected-commit-log-entries-from-a-git-repository-while-keeping-th probably this might help. – anshul Gupta Jul 03 '17 at 09:23
  • How about using squash? https://github.com/blog/2141-squash-your-commits – samAlvin Jul 03 '17 at 09:23

0 Answers0