Answer the question
In order to leave comments, you need to log in
How to remove commits from a branch?
Hello, I have such a problem, I want to use Git-Flow, but here I already have commits in master and I need to delete them and leave only the very first one.
How can I do that ?
Answer the question
In order to leave comments, you need to log in
"Remove" - from the word "absolutely", or just hide changes inside other commits?
It is necessary to look towards interactive rebase.
Daniel read a better book about Git Pro Git there you will find answers to all your questions
https://help.github.com/articles/about-git-rebase/
https://git-scm.com/book/en/v2/Git-Tools-Rewriting...
This is if you want to remove commits from history . If the history needs to be left, and just go to the state of the first commit, then see the answer jcmvbkbc
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question