E
E
Evgeny Babkin2016-05-09 11:56:45
git
Evgeny Babkin, 2016-05-09 11:56:45

How to roll back a branch to the state immediately after it was created?

There is a branch in which files were created and edited more than once. It is necessary to roll back the branch to the state when it was generally empty, that is, immediately after its creation. Can this be done, and if so, how?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
sgrogov, 2016-05-10
@hey_joe

The very moment of creating a branch is not fixed anywhere, you can roll back only to a specific commit. You can rollback through
Find out the hashes of previous commits through or in the Github / Bitbucket
/ GUI application interface, if
used

D
Dmitry Arushanov, 2016-05-09
@daruwanov

Maybegit stash

I
Ivan Vorobei, 2016-05-09
@ivanvorobei

View the history of changes, rollback to the desired commit:
git checkout

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question