Git User Setup

From FRC11 - Mentor Wiki
Jump to navigation Jump to search

Setup and try Git using Git Extensions or TortoiseGit. First need to generate a private key for use with the repositories.

(TBD, taken from MORT U 2018 Day 2, may need clean-up)

Installs:

  • gitlab A web-based Git-repository manager providing wiki, issue-tracking, and continuous integration features.
  • puttygen A public/private key generator
  • Git Extensions

Setup:

  1. Run puttygen to create a private key for use in Git
  2. In puttygen, Generate public/private key and save to C:\users\user\.ssh\tortoisekeys (on Macs, in ~/.ssh/ )
  3. open gitlab -> Profile pic -> Settings -> Side ssh keys -> title key -> paste key
  4. Right Click -> Tortoise git -> Settings -> Git credentials -> Username -> use first and last name
  5. Make a new folder
  6. Make a new repository (private)
  7. Copy ssh URL
  8. Git create repo here
  9. Git sync -> manage -> paste URL
  10. Create blank text file
  11. Git -> ssh -> putty key -> link key
  12. Commit -> message "initial commit"
  13. Check mask file
  14. Commit
  15. Check repository - nothing there?
  16. We need to push! Commits are only local save states
  17. Click elipses on local branch, Click master
  18. Push -> yes
  19. Add stuff and change things to the file
  20. Do two commits, then push
  21. Delete local file
  22. Copy ssh URL from gitlab
  23. Paste URL
  24. Load putty key -> click key
  25. Do one more commit and change, and then push
  26. Oops made a mistake
  27. Show Log -> Right click -> commit -> Reset master to this