Table of Contents
GIT命令
RemoteRepo <----> LocalRepo <----> Stage <----> Working
git add: Working --> Stage
git commit: Stage --> LocalRepo
git push: LocalRepo --> RemoteRepo
git fetch: RemoteRepo --> LocalRepo
git pull: RemoteRepo --> LocalRepo --> Working
git reset --soft: reset LocalRepo
git reset --mixed: reset LocalRepo+Stage
git reset --hard: reset LocalRepo+Stage+Working
git revert: Keep all commit and add new commit equals to the revert one.
git clean -df: clean untracked folders and files.
git checkout: LocalRepo --> Working
SSH命令
ssh-kegen:生成私钥和公钥。
ssh-copy-id:将公钥复制到远程机器的authorized_keys文件中。
ssh-agent:认证代理,作为一个本地后台进程管理私钥,避免重复输入密码。
ssh-add:将私钥添加到认证代理。
ssh-agent -s ; ssh-keygen ; ssh-copy-id USERNAME@<ip> -p <port>
Change the default svn ssh port for svn: ~/.subversion/config/[tunnels]/ssh = ssh -p <port>