Advertisement
Guest User

Untitled

a guest
Sep 16th, 2013
913
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. To add a repo
  2. Create Repo on GitHub site
  3.  
  4. Git instructions:
  5. cd into directory with source
  6. $ git init
  7. $ touch README
  8. fill in README file
  9. $ git add README
  10. $ git commit -m 'first commit'
  11. $ git remote add origin git@github.com:<Username>/<Name of repo on site>/.git
  12. $ git push -u origin master
  13. README is now in repo on GitHub site
  14. $ git add *
  15. $ git commint -m 'first commit'
  16. $ git push -u origin master
  17. All project files are now in repo on GitHub site
  18.  
  19. To clone a repo (after a fresh install of Git or OS):
  20. Git instructions:
  21. cd into directory for projects
  22. $ git clone git://github.com/<Username>/<Name of repo on site>.git
  23.  
  24. To get the latest version of the repo
  25. Git instructions:
  26. cd into directory with source
  27. $ git pull https://github.com/<Username>/<NameofRepo>.git
  28.  
  29. To push the latest version of the source code:
  30. Git instructions:
  31. cd into the directory
  32. $ git add *
  33. $ git commit -m 'message for commit'
  34. $ git push -u origin master
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement