0

If I have a bunch of merge commits on a branch, if I use

git reset --soft <old_sha>

will git remove/delete the commits between old_sha and the most current commit - git does garbage collection right? Just looking to save disk space.

1 Answer 1

2

git reset only resets the HEAD to the specified state, see the docs. You need the git gc command to delete the unnecessary objects from the disk. See the docs for the details.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.