Answers for "how to restore git reset command"

17

git restore, reset, revert, go back

git clean -fdx
Posted by: Guest on March-18-2020
1

git reset

# Create a new file called `foo.py` and add some code to it

# Commit it to the project history
git add foo.py
git commit -m "Start developing a crazy feature"

# Edit `foo.py` again and change some other tracked files, too

# Commit another snapshot
git commit -a -m "Continue my crazy feature"

# Decide to scrap the feature and remove the associated commits
git reset --hard HEAD~2
Posted by: Guest on January-26-2022

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language