I just changed the README file and want to sync it in github, but it always tells me "You cannot sync with unstaged changes". Could someone tell me what it is and how should I fix this?
Unstage Commits HardThe staging index is reset to match the specified commit. Working Directory is reset to match specified commit. Any pending changes in the Working Directory and Staging Index are lost.
unstaged (not comparable) (theater) Not formally staged; not presented to an audience on a stage.
When you're ready to save a copy of the current state of the project, you stage changes with git add . After you're happy with the staged snapshot, you commit it to the project history with git commit . The git reset command is used to undo a commit or staged snapshot.
TL;DR: When one file has staged and unstaged changes, a commit will commit both versions, with the most recent changes to the file.
Look at learn.github:
You need to:
git add
), git commit -m "your modification comment"
), git push
).So "unstaged changes" aren't linked to GitHub, but are local modifications on your local repo, which you haven't yet added to the index ("staged"), for a future commit.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With