Last active
November 12, 2015 02:05
-
-
Save wsky/3203965 to your computer and use it in GitHub Desktop.
usual git cmd and svn
This file contains hidden or 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
| # https://github.com/Kunena/Kunena-2.0/wiki/Create-a-new-branch-with-git-and-manage-branches | |
| git branch net20 | |
| git push origin net20 | |
| git checkout net20 | |
| git branch -d [branch] | |
| git push origin --delete [branch] |
This file contains hidden or 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
| gi remote add cooper-local ../../codesharp/cooper | |
| git remote -v | |
| git fetch cooper-local | |
| git branch -a | |
| git merge cooper-local/master |
This file contains hidden or 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
| #bare clone | |
| git clone --bare git@github.com:codesharp/cooper.git | |
| #rename author | |
| git filter-branch --env-filter 'if [ $GIT_AUTHOR_EMAIL = wskyhx@gmail.com ]; then GIT_AUTHOR_EMAIL=houkun@taobao.com; fi; export GIT_AUTHOR_EMAIL' | |
| ##push force | |
| git push --force origin master | |
| ##push mirror | |
| git push --mirror git@github.com:codesharp/cooper-mirror.git |
This file contains hidden or 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
| git remote add cooper git@github.com:codesharp/cooper.git | |
| git remote -v | |
| git fetch cooper | |
| git branch -a | |
| git merge cooper/master | |
| git log --graph -2 |
This file contains hidden or 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
| http://stackoverflow.com/questions/1270514/undoing-a-git-push | |
| git reset cc4b63b | |
| git push -f origin master | |
This file contains hidden or 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
| git submodule add git://github.com/wsky/fluent-nhibernate.git external/fluent-nhibernate | |
| git submodule init | |
| git submodule update | |
| git submodule foreach git checkout master | |
| #remove submodule | |
| #http://stackoverflow.com/questions/1260748/how-do-i-remove-a-git-submodule | |
| #Delete the relevant section from the .gitmodules file. | |
| #Delete the relevant section from .git/config. | |
| #Run git rm --cached path_to_submodule (no trailing slash). | |
| #Commit and delete the now untracked submodule files. |
This file contains hidden or 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
| svn co url dir | |
| svn add . --force | |
| svn ci -m "log" |
This file contains hidden or 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
| git tag -a v0.1 -m "version 0.1 released" | |
| git push --tags | |
| git pull | |
| git checkout v0.1 |
This file contains hidden or 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
| git status | |
| git add -A | |
| git commit -a -m "commit detail" | |
| git push |
Author
Author
185.31.17.185 github.global.ssl.fastly.net
Author
Host *
ServerAliveInterval 60
ServerAliveCountMax 3
Author
Author
On branch master
Your branch is up-to-date with 'origin/master'.
Untracked files:
(use "git add <file>..." to include in what will be committed)
.gitignore
"\350\275\246\345\225\206\350\264\267\345\216\237\345\236\213\345\233\276/"
nothing added to commit but untracked files present (use "git add" to track)git config core.quotepath false
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Install
http://git-scm.com/
or
http://github.com
Commit
git status git add -A git commit -a -m "commit detail" git pushPull-Request
http://www.worldhello.net/gotgithub/04-work-with-others/010-fork-and-pull.html
Pull-Request With Local Repos
http://stackoverflow.com/questions/5775580/git-pulling-changes-between-two-local-repositories
that's cool!
BugTrace
use github issues to bugtrace.
before fix bugs, always create issues to record them.
Link Commit to Issue