Answer the question
In order to leave comments, you need to log in
How to revert temporary changes to a local version of a Git repository?
Hello, not so long ago I started using Git in my projects, the question constantly arises: the local version of the site needs preliminary code changes in order to make money on the local machine. Since these changes must be made before the start of the main work, then the commits, respectively, will be one of the first. When the development process is completed and all branches are merged, before pushing to the server, I need to roll back the code changes that are responsible for the site to work on the local machine, how can I do this?
Answer the question
In order to leave comments, you need to log in
Move all locally dependent data to a separate file.
File in .gitignore
As a result, everything works locally, changes to these files do not get into git
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question