This might sound like a bit of a question that gives the impression of me being too lazy to do my own research, but I've actually failed to find resources that assist in my issue.
I'm currently working with two Git clones from the same repository that were each cloned on my personal laptop and a computer I use at work. Sometimes when I push to the repository from my laptop, I forget to pull on my work computer and later when I try to commit changes from my work computer to the repository I get an error message telling me to perform git pull first. Is there any way that I can undo the pushed changes in this case that were made from my laptop?
Thanks in advance.
git reset, and thengit push --forceto rewrite the history on remote. But in the end it's not recommended. Git tells you togit pullfrom your work computer, then just do it. What's wrong withgit pull? It's trivial to do, far more simple and safer than--forcestuff.--forceyour push, and later pull/push from the laptop. Then again, I find Loi's advice to be the common sense answer, you should consider it first.git pullis because the changes that I had made on my work computer were quite a lot and I'm afraid that pulling would reset my work. Would that be the case?