Skip to content
This repository has been archived by the owner on Apr 13, 2021. It is now read-only.

Be more efficient with Git #24

Closed
techman83 opened this issue Jun 26, 2015 · 1 comment
Closed

Be more efficient with Git #24

techman83 opened this issue Jun 26, 2015 · 1 comment

Comments

@techman83
Copy link
Member

Depending on how we need to do things, rather than deleting the whole directory we could get away with a git reset --hard HEAD (or --hard origin/master) to discard all git changes from the staging area and working directory. That can be followed with git clean -df to remove all untracked files and directories.

In our case that might actually make things more complex, but in theory it should then be possible to just pull down the commit objects between what we had last and what's out there now, which should be faster and smaller than a complete clone each time.

@techman83
Copy link
Member Author

I'm thinking it might be worthwhile making these explicit methods, rather than something that happens on instantiation. It'll also break my brain out of it's current deep recursion.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant