SoureTree & Git

1. Version Control

  • Open SourceTree
  • 'File' -> 'New' -> 'New' -> 'Create Local Repository'
  • 'Repository type': Git & Select 'Destination Path'
  • Stage & Commit

If you want go to certain version, right click it and select 'checkout'

2. Working Together

2.1 On MAC

  • Open Terminal
ssh-keygen
# then set password 
cat .ssh/id_rsa.pub
# then copy the key content
  • Open www.github.com
  • Profile Settings -> New SSH Key -> Input titile name & paste the key content
  • Copy Repository URL from Github
  • SourceTree -> Repository -> Repository Settings -> Remote -> Add -> set Remote name to be origin & paste URL
Now we can upload our change to Remote

click 'origin' -> click Push icon -> click master branch

  • accept server's key: YES

Now you are gonna load your own SSH key to identify yourself to the server. If you are on a mac, you only need to provide your paraphrase if you saved the key at default location. In windows, you can use PuTTY SSH key agent, 'Pageant'

你可能感兴趣的:(SoureTree & Git)