It's recommended in a lot website that you should download a tool named PuttyGen.exe at the first. but I found it doesn't work in my windows workstation after I added my public key which is generated by PuttyGen. Always "permission denied" is prompted.
A simple way for this is copying a pair of key(private key and public key) from another linux workstation. Maybe public key is not allow to copied, rename it, making it do not have .pub suffix, in linux workstation with sudo command.
Put this pair of key(id_rsa and id_rsa.pub) in:
- C:\Documents and Settings\yourname\.ssh\
- $ ssh –p port youraccountname@gerrit_server
2, about git. in linux, you can input git command in terminal directly while in windows, you can download a git bash in git official website. its the same with linux terminal.
Just some branch switch commands here.
- $ git branch -b BranchA #switch to BranchA, if BranchA doesn't exist, it will be #create automatically
- $ git branch -d BranchB #delete local branch BranchB
- $ git branch -av #show all branch
- * master
- remote/origin/HEAD
- remote/origin/branch1
- remote/origin/master
- $ git clone ssh://youraccount@gitserver #clone default branch
- $ git clone -b branch1 ssh://youraccount@gitserver #clone branch1
- $ git checkout remote/origin/branch1 #the same with upper command