A
A
Anna Makarova2019-02-17 23:53:23
git
Anna Makarova, 2019-02-17 23:53:23

Why after adding files to git, they are deleted on the computer?

I have a problem after commands like:
git add .
git commit -m "some commit"
git push -u origin master
Files on the computer are overwritten to the state they were in the previous commite, this problem was not there recently, I have been working in a folder for week 3 and now there is such a problem in git everything is added, you have to download the documents again from gita every time.
The folder contains .html, .scss and .js files

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Shitskov, 2019-02-17
@Zarom

Why do you do git push with -u every time ? One is enough, the first time. Then it is enough to do just git push without specifying parameters. I believe this is what causes the branch to rollback to the previous commit of the origin branch.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question