Skip to content

fix: git add unstaged files before committing - #966

Merged
tiensonqin merged 1 commit into
masterfrom
fix/git-staging
Dec 21, 2020
Merged

tiensonqin merged 1 commit into
masterfrom
fix/git-staging

Conversation

@gyk

@gyk gyk commented Dec 21, 2020

Copy link
Copy Markdown
Contributor

The current implementation assumes Git's working tree and staging area are exactly the same, however, due to some mysterious concurrency bug, a file might be modified but unstaged, leaving the user in a state where neither pulling nor pushing is possible.

This PR will git add all unstaged files before committing and pushing.

@gyk
gyk requested review from defclass and tiensonqin December 21, 2020 07:24

@tiensonqin tiensonqin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tiensonqin
tiensonqin merged commit a1ff34f into master Dec 21, 2020
@tiensonqin
tiensonqin deleted the fix/git-staging branch December 21, 2020 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

push失败 Don't create git empty commit

2 participants