Git常备命令
自省
git --help git add --help
基本操作
git init git add . git add -e . git delete test.txt git commit -m 'fix sth.' git status git log git reset git diff git checkout
远程操作
git clone https://github.com/stormhouse/pyStudy.git git pull git push -u origin master
查看
$ git remote -v origin git@github.com:stormhouse/pyStudy.git (fetch) origin git@github.com:stormhouse/pyStudy.git (push)
修改remote
$ git remote remove origin
git remote add origin https://github.com/stormhouse/pyStudy.git
git pull
git push origin master
添加ignore
# .gitignore /.idea /node_modules/ *.pyc
Comments
Please enable JavaScript to view the comments powered by Disqus. comments powered by Disqus