R
R
Roman2020-11-18 11:42:05
git
Roman, 2020-11-18 11:42:05

How to update a project from github?

Yesterday, after completing work on the project, I uploaded it to github like this:

git add -A
git commit -a -m"последнее обновление"
git push example

examplehere is the address of my repository.
Today I worked in the project, but I decided to return the version that I pushed yesterday, I prescribe
git pull, in response I get already up to date. What have I done wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman, 2020-11-18
@RomanTRS

If you have not made a commit yet, then simply revert the changes to the files.
git checkout *
If you have already saved the changes, then roll back to the desired commit.

git hist                           //выводим историю и узнаем хэш нужного коммита
git checkout <COMMIT_HASH>         //загружаем нужный коммит

And take the Git How To course .
It won't take long and your understanding of the git will improve.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question