V
V
Vann Damm2020-02-18 21:37:48
JavaScript
Vann Damm, 2020-02-18 21:37:48

How can I undo adding files that have been copied from a remote server?

I copied files added (by another person) to git with git pull (which I didn’t have) into the working directory and now I need to return everything so that it was before I used git pull, I can’t find how to do this ?!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Shitskov, 2020-02-18
@Zarom

git log
Find your last commit, take its hash
git checkout хеш_коммита

N
Nikolai Alexandrov, 2020-02-18
@dos

We write git log and look at all the changes that have been in the repository lately. Each change has a date and a commit ID like 2906fca4d20232858fb1c124d054e2c6da46ab66. To rollback to a specific commit, just run git checkout commit_id

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question