-
-
Save danhantao/11311461 to your computer and use it in GitHub Desktop.
一些git相关的内容
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .gitconfig https://gist.github.com/larrytin/7096087 | |
# git config --global user.name "name" | |
# git config --global user.email "[email protected]" | |
# git config --global branch.autosetuprebase always | |
# git config branch.master.rebase true | |
# git config --global http.sslVerify false | |
# curl -Lo `git rev-parse --git-dir`/hooks/commit-msg | |
# chmod u+x `git rev-parse --git-dir`/hooks/commit-msg | |
# ~/.netrc | |
# %HOME%\_netrc | |
machine goodow.com login name password secret | |
# eclipse | |
https://raw.github.com/goodow/realtime/master/resources/eclipse/settings/mechanic/Tasks.json | |
# GIT | |
git pull --rebase origin master | |
git add . /git add -u | |
git rebase --continue | |
git reset | |
git checkout | |
git branch | |
git remote -v | |
git push origin HEAD:refs/for/master [option -f] | |
#allow empty commit | |
git commit --allow-empty -m "Empty" | |
git commit --amend --allow-empty --reset-author | |
# cherry-pick | |
git cherry-pick <commit id> | |
# delete remote branch | |
git push origin :<branchName> | |
git tag -d <tagname> | |
git push origin :refs/tags/<tagname> | |
# 1.7 | |
git push origin --delete <branchName> | |
git push origin --delete tag <tagname> | |
# view local and remote branch | |
git branch -a | |
#GIT查看、删除、重命名远程分支和TAG | |
http://zengrong.net/post/1746.htm | |
-------------------------------------------------------------------------------------------------------------------- | |
添加子模组:git submodule add | |
查看子模组:git submodule status -代表未被检出 | |
克隆出子模组形式应用的外部库:git submodule init git submodule update (检出的都会处于非跟踪状态) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment