Skip to content

Instantly share code, notes, and snippets.

@wsky
Last active November 12, 2015 02:05
Show Gist options
  • Save wsky/3203965 to your computer and use it in GitHub Desktop.
Save wsky/3203965 to your computer and use it in GitHub Desktop.
usual git cmd and svn
# 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]
gi remote add cooper-local ../../codesharp/cooper
git remote -v
git fetch cooper-local
git branch -a
git merge cooper-local/master
#bare clone
git clone --bare [email protected]:codesharp/cooper.git
#rename author
git filter-branch --env-filter 'if [ $GIT_AUTHOR_EMAIL = [email protected] ]; then [email protected]; fi; export GIT_AUTHOR_EMAIL'
##push force
git push --force origin master
##push mirror
git push --mirror [email protected]:codesharp/cooper-mirror.git
git remote add cooper [email protected]:codesharp/cooper.git
git remote -v
git fetch cooper
git branch -a
git merge cooper/master
git log --graph -2
http://stackoverflow.com/questions/1270514/undoing-a-git-push
git reset cc4b63b
git push -f origin master
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.
svn co url dir
svn add . --force
svn ci -m "log"
git tag -a v0.1 -m "version 0.1 released"
git push --tags
git pull
git checkout v0.1
git status
git add -A
git commit -a -m "commit detail"
git push
@wsky
Copy link
Author

wsky commented Jun 5, 2014

Host *
ServerAliveInterval 60
ServerAliveCountMax 3

@wsky
Copy link
Author

wsky commented Sep 7, 2015

@wsky
Copy link
Author

wsky commented Nov 12, 2015

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