I
I
ijakparov2016-05-02 13:13:15
git
ijakparov, 2016-05-02 13:13:15

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

2 answer(s)
M
ManWithBear, 2016-05-02
@ManWithBear

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

M
Melkij, 2016-05-02
@melkij

the local version of the site needs preliminary code changes

Fix this instead of inventing weird commit history tweaks.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question