git基礎

save credential into cache

git config --global credential.helper cache

reset local changes

git checkout .

reset indexes

git reset --hard HEAD .

remove file from index

git rmでインデックスから削除。

–cachedをつけることでファイルが削除されない。

git rm --cached {file}
or
git rm -r --cached {dir}

 

reset origin

git fetch origin
git reset --hard origin/master

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.