0

everyone I'm very new at git but right now I'm doing some project that using git.

I have some problem that after I just setup as image below enter image description here

Then, I had done with 2 changed commits without anything going wrong.

enter image description here

And here this a problem, I want to revision the file to version1. and I do like this.

enter image description here

Then, I want to edit the file that I was revision which is version1 and commit it as version3. So I get the error like this.

enter image description here

I thought that for this situation, git is working correctly. But I really want to make this task working well. Are there anyway to do like this without an errors? Because my projet will use it not for keeping version of source code from developer. So I want to use it in other way. Thank you.

  • 1
    You can use `git push -f` to force a push. However, it does have a few problems. Read The Dark Side of the force push http://willi.am/blog/2014/08/12/the-dark-side-of-the-force-push/ – alexyorke Aug 22 '17 at 17:31
  • Possible duplicate of [Reset or revert a specific file to a specific revision using Git?](https://stackoverflow.com/questions/215718/reset-or-revert-a-specific-file-to-a-specific-revision-using-git) – max630 Aug 23 '17 at 00:51

0 Answers0