7-15 1,056 views
删除本地和远程tag
git tag -d v0.0.1
git push --delete origin v0.0.1
add and push tag
git tag v0.0.2 -m "theme and styles"
git push origin v0.0.2
# push all the tags
git push origin --tags
查看库的地址
git remote -v
添加的缓冲区
git add main.cpp
git add *
git add *.cpp
撤销添加
git reset *.cpp
提交到本地
git -commit -m "modify sth"
推送到远端
git push
恢复本地修改
git checkout -- filename
常见错误
warning: push.default is unset; its implicit value is changing in Git 2.0 from 'matching' to 'simple'. To squelch this message and maintain the current behavior after the default changes, use
error setting certificate verify locations:
git config --system http.sslcainfo "C:\Program Files (x86)\git\bin\curl-ca-bundle.crt"
or — not really recommended — you may choose to switch off SSL checks completely by executing:
git config --system http.sslverify false
git log
git log -2
分支
列出本地分支
git branch
列出远程分支
git branch -r
列出所有分支
git branch -a
根据日志ID创建分支
git branch origin/v1.0 2582ef3f2dffd4b000d556e48464be24d90ddc90
切换到 origin/v1.0 分支
git checkout origin/v1.0
I’ve been surfing online more than 2 hours today, yet I never found any
interesting article like yours. It is pretty worth enough for me.
In my view, if all site owners and bloggers made good content as
you did, the web will be much more useful than ever before. http://www.yahoo.net
thank you, I will strive to enrich the blog.