您的位置:首页 > 其它

git 常用指令

2015-05-21 15:28 405 查看
1.git clean -d -x -f


will remove untracked files, including directories (
-d
) and files ignored by git (
-x
). Replace the 
-f
argument
with 
-n
 to perform a dry-run or 
-i
 for interactive mode and it will tell you what will be removed.
2.git reset --hard


 To reset the entire repository to the last committed state

1沒辦法移除原本就有被tracked files,所以必須在靠2,來把有修改過得檔案,也回復到最後的commit state

適合情況:新的一包git trunk抓下來,有修改一些東西,也有build過,但還沒commit,而且回到最初剛抓下來時的樣子時,就適合同時使用1 and 2來處理
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: