[config]
git config --global user.name "Your Name"
git config --global user.email "email@example.com"
git config --global color.ui true (config ui color)
git config --global alias.co checkout (config alias name)
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" (config alias name)
[init]
git init
[add]
git add <file>
git add -A (stages All)
git add . (stages new and modified, without deleted)
git add -u (stages modified and deleted, without new)
[commit]
git commit -m "<log>"
[status]
git status
[diff]
git diff <file>
git diff HEAD -- <file> (see difference between workspace and repository)
[log]
git log --pretty=oneline
git log --graph --pretty=oneline --abbrev-commit
git reflog (see cmd record)
[reset]
git reset --hard HEAD^ (rollback a version
git reset --hard 3628164
git reset HEAD <file> (cancel modification of stage, put it back to workspace)
[rm]
git rm <file> (if delete is an error, use "git checkout -- <file>" to get it from repository)
[checkout]
git checkout -- <file> (discard modification of workspace)
git checkout dev (switch to branch 'dev', if there's no 'dev' branch local and remote has a 'dev', it'll create local dev link remote dev)
git checkout - (checkout your last branch)
git checkout -b dev (create new branch 'dev' and switch to it)
git checkout -b dev origin/dev (create local 'dev' branch linked to 'origin/dev')
git checkout --orphan <branchname> (make the branch no commit history)
git checkout <version> -- . (checkout version and discard all modifications in working dir)
git checkout HEAD -- . (checkout HEAD and discard all modifications in working dir)
[ssh-keygen]
ssh-keygen -t rsa -C "youremail@example.com"
[remote]
git remote add origin git@github.com:<username>/<projectname>.git
git remote -v (view remote info)
[push]
git push -u origin master (first time use -u, make link between remote and local)
git push origin master
git push origin master -f (push by force)
git push origin :dev (delete remote branch)
git push origin 'v1.0' (push tag to remote)
git push origin --tags (push all tags to remote)
git push origin :refs/tags/v1.0 (delete tag of remote)
[pull]
git pull (pull from remote linked branch and merge to current branch)
git pull <remote> <branch>
[fetch]
git fetch origin master:tmp
git diff tmp
git merge tmp
git fetch (fetch all branches & tags update(without prune) from remote)
git fetch --prune (fetch all branches & tags prune from remote)
[clone]
git clone git@github.com:<username>/<projectname>.git
[branch]
git branch (see all branches and current branch which with a '*')
git branch dev (create branch dev)
git branch -d dev (delete 'dev' branch)
git branch -D dev (delete 'dev' branch by force)
git branch -r (see remote branches)
git branch -a (see all local/remote branches)
git branch -t dev origin/dev (create a local branch 'dev' linked to 'origin/dev')
git branch --set-upstream dev origin/dev (set local 'dev' link to remote 'origin/dev', this cmd is deprecated, please use the following cmd)
git branch -u origin/dev (do it in the branch you want to link to 'origin/dev')
git branch --unset-upstream dev (unset local 'dev' link to the remote)
git branch --merged (see which branches merged into the branch where your are)
git branch --no-merged (see which branches have not merged into the branch where your are)
git branch -vv (see the links between local and remote)
[merge]
git merge dev (merge dev to master, if conflict, fix it and add all to stage, commit)
git merge --no-ff -m "merge with no-ff" dev (forbid 'fast forward', you can see branch info even after delete it)
[stash]
git stash (save workspace)
git stash list
git stash pop
git stash apply <stashname>
git stash drop <stashname>
[tag]
git tag (see all tags)
git tag v1.0 (make a tag)
git tag v1.0 6224937 (make tag v1.0 to commit id:6224937)
git tag -a v1.0 -m "version v1.0 release" 6224937
git tag -s v0.2 -m "signed version 0.2 released" fec145a (tag with a private key, PGP signature, GnuPG must be installed)
git tag -d v1.0 (delete tag)
[show]
git show v1.0
[svn]
git svn clone file:///tmp/test-svn -T trunk -b branches -t tags (The following command is equivalent)
git svn clone file:///tmp/test-svn -s
(This runs the equivalent of two commands - git svn init followed by git svn fetch - on the URL you provide.
'-s' is short for '-T trunk -b branches -t tags', if you do not have trunk, branch and tags dir, remove -s as following)
)
git svn clone file:///tmp/test-svn
git svn command may has a bug:
unable to remap msys-ssl-0.9.8.dll to same address as parent - 0x678F0000
The root cause of this issue and any variants of it is two DLLs have been mapped to the same address, causing a conflict. Individual cases can be solved using rebase.
Msysgit 1.9.4-preview20140815 contains a case of this issue with the libsvn_repos-1-0.dll and libneon-25.dll libraries. Using the command git svn gives a similar error message as described in the question.
The bug report contains this workaround:
Rebase to free regions via: (execute as Administrator)
rebase -b 0x64000000 bin/libsvn_repos-1-0.dll
rebase -b 0x64200000 bin/libneon-25.dll
After this git svn works correctly.
git config --global user.name "Your Name"
git config --global user.email "email@example.com"
git config --global color.ui true (config ui color)
git config --global alias.co checkout (config alias name)
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" (config alias name)
[init]
git init
[add]
git add <file>
git add -A (stages All)
git add . (stages new and modified, without deleted)
git add -u (stages modified and deleted, without new)
[commit]
git commit -m "<log>"
[status]
git status
[diff]
git diff <file>
git diff HEAD -- <file> (see difference between workspace and repository)
[log]
git log --pretty=oneline
git log --graph --pretty=oneline --abbrev-commit
git reflog (see cmd record)
[reset]
git reset --hard HEAD^ (rollback a version
git reset --hard 3628164
git reset HEAD <file> (cancel modification of stage, put it back to workspace)
[rm]
git rm <file> (if delete is an error, use "git checkout -- <file>" to get it from repository)
[checkout]
git checkout -- <file> (discard modification of workspace)
git checkout dev (switch to branch 'dev', if there's no 'dev' branch local and remote has a 'dev', it'll create local dev link remote dev)
git checkout - (checkout your last branch)
git checkout -b dev (create new branch 'dev' and switch to it)
git checkout -b dev origin/dev (create local 'dev' branch linked to 'origin/dev')
git checkout --orphan <branchname> (make the branch no commit history)
git checkout <version> -- . (checkout version and discard all modifications in working dir)
git checkout HEAD -- . (checkout HEAD and discard all modifications in working dir)
[ssh-keygen]
ssh-keygen -t rsa -C "youremail@example.com"
[remote]
git remote add origin git@github.com:<username>/<projectname>.git
git remote -v (view remote info)
[push]
git push -u origin master (first time use -u, make link between remote and local)
git push origin master
git push origin master -f (push by force)
git push origin :dev (delete remote branch)
git push origin 'v1.0' (push tag to remote)
git push origin --tags (push all tags to remote)
git push origin :refs/tags/v1.0 (delete tag of remote)
[pull]
git pull (pull from remote linked branch and merge to current branch)
git pull <remote> <branch>
[fetch]
git fetch origin master:tmp
git diff tmp
git merge tmp
git fetch (fetch all branches & tags update(without prune) from remote)
git fetch --prune (fetch all branches & tags prune from remote)
[clone]
git clone git@github.com:<username>/<projectname>.git
[branch]
git branch (see all branches and current branch which with a '*')
git branch dev (create branch dev)
git branch -d dev (delete 'dev' branch)
git branch -D dev (delete 'dev' branch by force)
git branch -r (see remote branches)
git branch -a (see all local/remote branches)
git branch -t dev origin/dev (create a local branch 'dev' linked to 'origin/dev')
git branch --set-upstream dev origin/dev (set local 'dev' link to remote 'origin/dev', this cmd is deprecated, please use the following cmd)
git branch -u origin/dev (do it in the branch you want to link to 'origin/dev')
git branch --unset-upstream dev (unset local 'dev' link to the remote)
git branch --merged (see which branches merged into the branch where your are)
git branch --no-merged (see which branches have not merged into the branch where your are)
git branch -vv (see the links between local and remote)
[merge]
git merge dev (merge dev to master, if conflict, fix it and add all to stage, commit)
git merge --no-ff -m "merge with no-ff" dev (forbid 'fast forward', you can see branch info even after delete it)
[stash]
git stash (save workspace)
git stash list
git stash pop
git stash apply <stashname>
git stash drop <stashname>
[tag]
git tag (see all tags)
git tag v1.0 (make a tag)
git tag v1.0 6224937 (make tag v1.0 to commit id:6224937)
git tag -a v1.0 -m "version v1.0 release" 6224937
git tag -s v0.2 -m "signed version 0.2 released" fec145a (tag with a private key, PGP signature, GnuPG must be installed)
git tag -d v1.0 (delete tag)
[show]
git show v1.0
[svn]
git svn clone file:///tmp/test-svn -T trunk -b branches -t tags (The following command is equivalent)
git svn clone file:///tmp/test-svn -s
(This runs the equivalent of two commands - git svn init followed by git svn fetch - on the URL you provide.
'-s' is short for '-T trunk -b branches -t tags', if you do not have trunk, branch and tags dir, remove -s as following)
)
git svn clone file:///tmp/test-svn
git svn command may has a bug:
unable to remap msys-ssl-0.9.8.dll to same address as parent - 0x678F0000
The root cause of this issue and any variants of it is two DLLs have been mapped to the same address, causing a conflict. Individual cases can be solved using rebase.
Msysgit 1.9.4-preview20140815 contains a case of this issue with the libsvn_repos-1-0.dll and libneon-25.dll libraries. Using the command git svn gives a similar error message as described in the question.
The bug report contains this workaround:
Rebase to free regions via: (execute as Administrator)
rebase -b 0x64000000 bin/libsvn_repos-1-0.dll
rebase -b 0x64200000 bin/libneon-25.dll
After this git svn works correctly.