clone
使用IDE,直接在vcs里,从git checkout,方便。
status
https://git-scm.com/book/zh/v1/Git-基础-记录每次更新到仓库
$ git status On branch master Your branch is up to date with 'origin/master'. #当从git上clone一个项目下来后(使用IDE PyCharm的Py项目),看status,会告诉我我的分支和master是update to date的。
$ git status On branch master Your branch is up to date with 'origin/master'. Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) modified: run.sh Untracked files: (use "git add <file>..." to include in what will be committed) lic no changes added to commit (use "git add" and/or "git commit -a") #添加新文件,IDE会提醒添加到git,如果没有添加,文件为红色,commit时可以选择添加到版本控制 #修改git上已有文件,会变蓝色,表示已修改。
ignore
在根目录创建.gitignore文件,这样就会忽略一些文件,不被提交到git
#忽略pyc,DS_Store结尾文件,忽略.idea/,migrations/下的文件, .pyc .idea/ .DS_Store migrations/ .log