85.9k views
2 votes
You can use the git ____ command to move an older commit to the HEAD so that you can revert to an older version of your code.

1 Answer

5 votes

Answer:

Reset

Step-by-step explanation:

Git reset is a powerful and time saving tool. It allows you to go back to the previous version of your code.

It becomes handy when after adding a new bunch of code results in bugs then you can roll back to the earlier commit.

HEAD is basically a reference to the current commit. Whenever you update your code a commit is created and HEAD shifts to the latest commit.

This way we can go back to any commit that we want without any difficulty or hassle.

User Mir Rahed Uddin
by
3.8k points