這是如此有問題,我只是混帳拉東西,然後說,有地方變化....我什麼也沒有改變......我嘗試重置,但它沒有用......任何人都可以幫助嗎?爲什麼git reset不起作用?
MacBook-Pro$ git reset --hard
HEAD is now at b89fcff the latest code in AWS to identify all difference and keep track
MacBook-Pro$ git checkout dev1.1
error: Your local changes to the following files would be overwritten by checkout:
OUTPUT_RESULTS_DIR/equity.csv
Please commit your changes or stash them before you switch branches.
Aborting
嘗試'git reset --hard .' where。指出你的當前目錄。我懷疑生活在子文件夾中的equity.csv沒有被清除。 – AADProgramming
*「我只是拉東西,然後它說有局部變化」* - 這種行爲的一個常見原因是在同一個文件中出現混合換行符('LF'和'CR LF')。閱讀更多:https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration#Formatting-and-Whitespace關於如何解決它。 – axiac
這個文件可能被標記爲skip-worktree,請參閱http://stackoverflow.com/a/11131211/3906760 – MrTux