Remove the first git commit from the history -
this question has answer here:
- change first commit of project git? [duplicate] 4 answers
- edit root commit in git? 5 answers
how can remove first git commit history? want tree start second commit. know git rebase -i <sha1_of_commit>
doesn't work first commit.
repository not shared anyone.
if still didn't published repo, can use git filter-branch
. bear in mind technically create new repository, unconnected old 1 (hence "if didn't published yet" rule).
git filter-branch --commit-filter ' if [ "$git_commit" = "full id/sha of commit want skip here" ]; skip_commit "$@"; else git commit-tree "$@"; fi' head
Comments
Post a Comment