git 常用指令

来源:互联网 发布:weka 删除数据 编辑:程序博客网 时间:2024/04/30 05:49
1.git clean -d -x -f

will remove untracked files, including directories (-d) and files ignored by git (-x). Replace the -fargument 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來處理

0 0
原创粉丝点击