Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

🛠 only commit staged changes #1817

Closed
wants to merge 9 commits into from
Closed

Conversation

Jephuff
Copy link
Contributor

@Jephuff Jephuff commented Jun 12, 2017

Proposed change to precommit: This stashes unstaged changes and then restores them so you can do partial commits.

@shanewilson
Copy link
Contributor

shanewilson commented Jun 12, 2017

hmm - have you read through these?

lint-staged/lint-staged#62
facebook/create-react-app#1759

they talk about merge conflicts coming about after the pop.

Can you setup sourcetree to use --no-verify?

@Jephuff
Copy link
Contributor Author

Jephuff commented Jun 12, 2017

I think the merge conflicts from popping would be pretty rare, and only when you are committing a file partially.
But If i'm the only one who has a workflow like this, I can just just skip the hook locally :)

@shanewilson
Copy link
Contributor

well we could also just remove the hook. if everyone has auto formatting on their editors then it does nothing

@cheapsteak
Copy link
Contributor

cheapsteak commented Jun 14, 2017

Partial commits would also be useful for me as well

I have just set up format on save

@cheapsteak
Copy link
Contributor

cheapsteak commented Jun 14, 2017

should we add this to our workspace settings?
image

Definitely don't want this on my user prefs

@Jephuff
Copy link
Contributor Author

Jephuff commented Jun 14, 2017

Is anyone relying on the precommit to lint their files? we could leave eslint in so it blocks unlinted commits.

@Jephuff
Copy link
Contributor Author

Jephuff commented Jun 14, 2017

@cheapsteak no complaints from me. We could also gitignore the settings file now that we don't need to support node_modules?

@cheapsteak
Copy link
Contributor

either way works for me, whatever would allow me to stop having to stash and unstash my settings between branches and pulls

@shanewilson
Copy link
Contributor

I would prefer we go with simple and not in anyones way. It looks like the easiest solution is to remove lint-staged. I'm fine with this since I get no benefit from it anyway - it was mostly because I thought @Jephuff didn't want to use auto-format on his editor.

@Jephuff Jephuff force-pushed the only-commit-staged-changes branch from 8cbd84e to bbd9e18 Compare June 15, 2017 14:49
@Jephuff Jephuff deleted the only-commit-staged-changes branch June 27, 2017 13:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants