You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Actually, it supports partial commit, In script, the codes say,
# since $file in working directory isn't always equal to $file in index, so we backup it
mv -f "$file""${file}.save"
It means it will backup the files in working tree, and then,
# discard changes in working directory
git checkout -- "$file"
As comments say, It discards the modifications in files in working tree. Now, the file in working tree is equal to the one in index. In other words, the files in working tree only contain the modification that user want to commit.
Hi,
I was wondering what happen when you commit only some chunk of a file. (Maybe you want the remaining chunk to be added in another commit later on).
The git add at the end of the script will add the complete file. Rhe whitespace modification and also the chunks that were left for the "next" commit.
The text was updated successfully, but these errors were encountered: